Combo Box Selection by Column

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

Guest

I have a combo box with four columns, I want to be able to lookup the
student by and of the four columns.

Student No.
Last Name
Test (SAT/ACT Student No)
National Student no.

How can I accomplish this, I only know how to select it by the first column.

Help is Appreciated

Len
 
Hi, Len.

I'm not sure I understand what you mean by "lookup the student by and of the
four columns". If you want to display them in the drop-down list, include
them in the RowSource property's SQL query:

SELECT Student No., LastName, Test, National Student no. FROM YourTable;

Once a row is selected, only one column can be displayed in the combo box,
determined by the first non-zero-width column as specified in the
ColumnWidths property. The value of the combo box, and what is written to
the underlying field specified in the ControlSource property (if any) is the
data in the BoundColumn.

To display other columns in other textboxes, use the Column property of the
textbox. Column uses an index of 0 for the first column, and so on. For
example, to display the third column of the combo box, set a textbox'
ControlSource to

=MyComboBox.Column(2)

Hope that helps.
Sprinks
 
Back
Top