Text Showed in a combo box

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

Guest

I have a Combo Box based in a table with thee columns. How can I modify the
column that appears in the Combo Box?

Thanks.
 
The combo box shows the first Visible column. A column is "visible" if the
width of that column is greater than zero in the combo box's properties. If
you still want the other columns to show in the drop down and just change
which of the columns shows in the textbox portion of the combo box, you need
to change the order of the columns. To do this, change the order of the
fields in the combo box's Row Source. If the Row Source is a table, use a
query based on the table instead. In the query, you can refer to the fields
in the order you want them to show.

Example:
SELECT Field1, Field2, Field3 FROM Table1;

This will show Field1, then Field2, then Field3 (left to right) in the combo
box. To change the order, just change the order of the fields in the query.

SELECT Field2, Field1, Field3 FROM Table1;

This will now show Field2, then Field1, then Field3. If all 3 columns are
visible, the column shown in the textbox will now be Field2.
 
Back
Top