Enable a text box based on an "Other" selection

  • Thread starter Thread starter los
  • Start date Start date
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
 
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]
 
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"
 

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

Back
Top