Enable a text box based on an "Other" selection

L

los

If a user selects "Other" from a combo box then the subsequent field,
which is a text field used to describe the "Other", should be enabled.
Otherwise, if "Other" is not selected, then the subsequent text field
remains disabled. How can I do this in an Access form?

Thanks.
Los
 
J

John Vinson

If a user selects "Other" from a combo box then the subsequent field,
which is a text field used to describe the "Other", should be enabled.
Otherwise, if "Other" is not selected, then the subsequent text field
remains disabled. How can I do this in an Access form?

Thanks.
Los

You'll need code (or to call code) in both the combo box's AfterUpdate
event, and also the Form's Current event (to make sure the textbox is
properly enabled for existing records):

Me!textboxname.Enabled = (Me!comboboxname = "Other")


John W. Vinson[MVP]
 
S

SusanV

Hi Los,

In the After Update event of the combobox, place the following code (change
control names to your actual control names):

me.textbox.enabled = me.combobox.value = "other"
 
Top