Combo box returning ID number and not name

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
 
J

Jack

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top