Combo box returning ID number and not name

  • Thread starter Thread starter greg
  • Start date Start date
G

greg

I am using a bound combo box to select which student, from another table.

I used this statement under rox source and got no names in the combo box:
SELECT tblStudents.Name FROM tblStudents;

Then I used the wizard to add the combo box and it made this statement: SELECT
tblstudents.ID1, tblStudents.Name FROM tblStudents;

I got the names in the box, but they box only returns the ID number and not
the name into the other table. Can someone tell me how to return the student's
name and not their ID number?

Greg
 
You return the students name by referencing the Column
property of the combo box as follows:

StudentsName = Me![yourComboBoxName].Column(1)

Since the combo box is bound to the record source by the
student's ID, you cannot make the student's name column
the bound column in the combo box.
 
Back
Top