Multi columns in a Combo Bax

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

Guest

How do you display multiple columns in a combo box and use only one column as
the control source in a table field?
 
Hi, Walt.

To display multiple columns in the drop-down list, include them in the query
statement specified in the RowSource property, e.g.,

SELECT CustID, CustomerName, City FROM Customers ORDER BY CustomerName;

You can also use the wizard. Enable it by toggling on the wand & stars
button on the Toolbox toolbar.

What is displayed in the drop-down is every column that is not set to 0"
width in the ColumnWidths property. The first non-zero-width column is
displayed in the box after the selection is made.

What is stored in the field specified in the ControlSource is the BoundColumn.

If you wish to display other columns after the selection, use the Column
property, and the column's index, starting with 0. For example, to display
the 3rd column, set the textbox' ControlSource to:

MyComboBox.Column(2)

Hope that helps.
Sprinks
 
Back
Top