General information
Category:
Coding, syntax & commands
Hello Jim.
>> I have set "BoundColumn" to 2, but when I select a row, the value in the combobox is from the first column and not the second. What am I doing wrong that I can't get the 2nd column text to show in the combobox display? <<
You are confusing the value of the combo box with its DisplayValue. The combo's value (which column is used to update its ControlSource when it is a bound control) is specified by its BoundColumn. The combo's DisplayValue always comes from the first column of its RowSource.
Combo boxes are particularly powerful controls because they enable you to display descriptive text from a lookup table while binding the control to its associated key value. This is possible only because the combo box has these two properties. Understanding the role each of them plays can be confusing, to say the least.
DisplayValue is the descriptive text that is displayed in the textbox portion of the control. This is what you see when the combo box is "closed." The combo's DisplayValue always comes from the first column of its RowSource. On the other hand, the combo's Value comes from whichever column is specified as its BoundColumn. If the BoundColumn of the combo box is column one, its Value and DisplayValue are the same when the user picks an item from the list. When the control's BoundColumn is not column one, these two properties are not the sam
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only