Combobox row source help with values

beefwellington

Registered User.
Local time
Today, 13:08
Joined
Jul 27, 2009
Messages
14
I have a combobox with its row source set as the First and Last name and University ID of students (format: "Last Name, First Name - Univ. ID#"). I'd like to have it so when I select a student, I get their Primary Key as the value instead of "Last Name, First Name - Univ. ID#" since this would require parsing the string and then looking up their ID. Is it possible to have the value of the combobox be the primary key but the drop down list display student names?
 
Yes it is, put the ID in the row sources, set it to be the bound column, increase your column count and set the width of the first column to be 0"
 
Yes it is, put the ID in the row sources, set it to be the bound column, increase your column count and set the width of the first column to be 0"

I'm a little confused.
So this is what I have now:
Code:
RowSource = SELECT LastName + ", " + FirstName + " - " UniversityID FROM Students ORDER BY LastName;

Bound Column = 1

How would I increase my column count and set its width? I don't see any option for this under the combobox property sheet
 
so this would be

RowSource = SELECT studentID, LastName + ", " + FirstName + " - " UniversityID FROM Students ORDER BY LastName;

You dont see column count and column width under the format property of the combobox?
 
so this would be

RowSource = SELECT studentID, LastName + ", " + FirstName + " - " UniversityID FROM Students ORDER BY LastName;

You dont see column count and column width under the format property of the combobox?

ahh Format... I was thinking it'd be under Data but that makes sense. Yes that worked. This saves me sooooo much work thanks.
 

Users who are viewing this thread

Back
Top Bottom