问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/40305833/populate-textbox-based-on-combobox-selection