DISPLAY 2 COLUMNS IN A COMBO BOX

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My combo box has 3 columns, a control column and 2 data columns. I can only
display the first data column when the combo box is at rest. The two data
columns display when the combo box list is popped. Is it possible to display
both data columns when the object is at rest (no focus, no popup list)?
 
Yes, just place two additonal text boxes beside the combo box. Set the
contorl souce to

=([me][comboboxname].[column(1))

Notet hat column is zero based, so 1 gives the 2nd collum...
 
You need to change the RowSource Query to combine the 2 Columns into one
since the Text component of the ComboBox can only display the value of 1
column in the selected row.

For example, If presently you have PersonID, LastName and FirstName as the 3
Columns, you can set the RowSource of the ComboBox to an SQL like:

SELECT PersonID, LastName & ", " FirstName AS FullName
FROM tblPerson
ORDER BY LastName, FirstName

Set the ColumnCount to 2 and BoundColumn to 1. Set the ColumnWidths as
appropriate.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top