Conditional Drop Down Box

  • Thread starter Thread starter Tyrone
  • Start date Start date
T

Tyrone

I am trying to make a form with a drop down selection
where depending on which item a person selects another
field becomes active to input data. Does anybody know how
this could be done?
 
Hi Tyrone

assume that your drop down box is called cbo_choices and contains a list of
where people heard about your company - and the textbox is called txt_other
and is only "active" when 'other' is chosen from cbo_choices

for the OnExit event of cbo_choices type the following code
if me.cbo_choices = "other" then
me.txt_other.enabled = true
me.txt_other.locked = false
me.txt_other.setfocus
else
me.txt_other.enabled = true
me.txt_other.locked = false
end if

then set txt_other in your form design (under properties) to enabled = false
and locked = true

Hope this helps
Cheers
JulieD
 
Back
Top