Hi, I have a combo box based on a query that displays all values from 2 fields (where category = foo). The user selects
the value they want however at this point only the second column value disappears, I want both columns to display.
Is this possible?
Use the Column(index) number to display the results... example for a combobox having two fields, LastName and FirstName...
LastName would be Column(0) and FirstName would be Column(1)
... to use in a messagebox.. the code would be similar to
msgbox "LastName is " & cboName.Column(0) & " And FirstName is " & cboName.Column(1)
If your combobox has one or more columns hidden, upon leaving the combobox, only the column(s) you don't have hidden will be displayed.
If, on the other hand, you need/want to hide one of the columns you can show the other column in a text box. For example, if you are displaying the LastName in the combobox (column(0)), then set the control source property of the text box equal to =cboName.column(1)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.