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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Fields - Dependant upon Drop-Down Selection

Status
Not open for further replies.

dexsquab

Programmer
Jan 13, 2005
11
0
0
GB
Greetings.

A quick and hopefully simple question for your eminent brains.

I have a drop-down list with several elements. The drop-down gets it's values via Lookup from another table. Depending upon the element chosen, I want to have several other fields to be either enabled or disabled.

As an example:
Say you have three options in the drop down list, being yes/no/other. If yes, then related fields are enabled (this as default). If no, then related fields disabled. If other, then one field (reason) is required.

So far I've tried Iif statements on the After Update option of the field which holds the dropped-down answer. I dont get any errors, but I dont get any response, either.

-----------------
If you can offer me help on this, please do so in the simplest possible terms, i.e., define for me not only the commands that need to be used, but where to use them.
 
Hey
In the onchange event of your combo box you need to put an if statement like this

if me.(name of the combo box) = (value)then
me.(name of element1 to disabe).enabed = false
me.(name of element2 to disabe).enabed = false
me.(name of element3 to disabe).enabed = false
end if


for different values use another if statement
hope this helps!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top