dmorgan20
dmorgan20

Reputation: 363

Populate textbox based on combobox selection

I am looking to update a textbox based on a combo box selection.

For example: If someone selects the word "Beach Holiday" from the drop down, then the text box will automatically populate with the word "Spain"

How do I do that?

I know I can do something similar to:

me.textbox = me.combo.column(1)

but that's not exactly what I am trying to do. Thanks in advance

Upvotes: 2

Views: 6174

Answers (1)

Lee Mac
Lee Mac

Reputation: 16015

Configure your ComboBox to have two columns, with the width of the second column set to 0 so that it is not displayed.

Then, set the Control Source of your Text Box to

=[YourComboBox].Column(1)

The value of the Text Box will then automatically update without the need for Event handlers.

Upvotes: 1

Related Questions