Open Text Box if "Other" Chosen in a Combo Box

J

Jennifer

I am designing a data entry form with multiple combo boxes
containing an "Other" option. I need to set up my form so
if someone chooses "Other" from a combo box, a text box
will open allowing the choice to be described. For
example:

Hair Color:

Brown
Blond
Red
Blue
Other Specify: _________

Thanks to anyone who can help!

Jennifer
 
T

tina

i'll call your textbox txtSpecify and the combobox cboColor. create a macro,
as

Macro Name: see Specify
Condition: [cboColor] = "Other"
Action: SetValue
Item: [Forms]![MyFormName]![txtSpecify].[Visible]
Expression: True
(next line)
Macro Name: {blank}
Condition: ... (ellipsis. type three dots, literally.)
Action: StopMacro
(next line)
Macro Name: {blank}
Condition: {blank}
Action: SetValue
Item: [Forms]![MyFormName]![txtSpecify].[Visible]
Expression: False
(next line)
Macro Name: {blank}
Condition: [txtSpecify] Is Not Null
Action: SetValue
Item: [Forms]![MyFormName]![txtSpecify]
Expression: Null
(next line)
Macro Name: {blank}
Condition: {blank}
Action: StopMacro

call the macro from the form's OnCurrent event, and from the combo box's
AfterUpdate event. and, of course, your text box has to be bound to a field
in the form's underlying table (or else you have to assign the value to the
field using a macro or VBA).

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top