Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Question

Status
Not open for further replies.

aperez54

Technical User
Aug 12, 2008
77
CA
I have an unbound combo box that looks up value from a table.

I have also enabled the Not In List event to allow users to add to the list as necessary.

If the user selects a value that is IN the list, I want to disable some other controls on the form. How do I do this?

Thanks in advance.
 
in the after update event

me.controlname.enabled= false
 
apologies, i should've put more info.

cmbMPID - unbound combo box, with look up from a table (3 columns)

On cmbMPID AfterUpdate event:

txtLastName - unbound text box, autopopulates when cmbMPID returns corresponding value that is within the list.

txtFirstName - unbound text box, autopopulates when cmbMPID returns corresponding value that is within the list.

On cmbMPID NotInList event:
Add value from cmbMPID to the MPID field on the lookup table.

What I need is, if the value selected is IN the list, I want to disable the txtLastName and txtFirstName. But if the value is NotInList, then it should be enabled.

But my issue is, the events conflict. The NotInList event allows the entry of the new data, so effectively, the value is technically IN the list, so won't it disable the txtLastName and txtFirstName anyway?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top