I'm building a ComboBox in an Excel userform that gets its rows from an Access table. I want to display several text fields to the user in the dropdown, but the value returned from the ComboBox should be the ID number associated with the row that the user selects (i.e. the ID column is the bound column). But I don't want to show this ID number to the user. Is there a way to hide a column in the ComboBox's dropdown, but still have that column be bound?
If you have three columns - the first the ID that's hidden and the other two shown - do something like this in the Properties window:
Note that Combobox1.Text will get return the text in the 2nd column (the first visible one) and Combobox1.Value will give you the bound column. (The ColumnHeads setting has no bearing on the above).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With