MS Access: combo box showing one thing, storing another

Having a little trouble with SQL statements here. I have a list of customers’ first names, last names, and then a number assigned to them. Since neither first nor last names are unique over the whole thing, but their (arbitrary) ID# is, I need to store customer-specific information relative to this ID number. However, in the table view and in the form view (when I actually get around to making a form) I need their [First Name Last Name] to display because who the heck is going to know anyone’s customer ID number.

I know that there must be a way to display this, and yet store the number associated with it instead of the value displayed in the combo box. Well, I don’t know it but I am hoping it is the case.

Thanks much…

Yes, there is. Set the ‘bound column’ property on the combo box to the column number of the value you want to store, and set the ‘column width’ property for that column to 0". For example, if the query that’s the source for the combo box returns three columns, |Firstname|Lastname|IDNumber|, you would set up the Combo Box control’s column count property to 3, bound column to 3, and column width property to (say) 2";2";0" . The control will store the IDNumber value of the selected row, but the display will only show Firstname|Lastname .

Exactly what SCSimmons. Checkout this site for some more useful information. It’s for the beginner/intermediate skillset.

I have always had good luck here. It has a look and feel similar to the SDMB. :slight_smile:

Thank you so much! I couldn’t get it to work right with using 0" to hide a column, but I set it to .01 and it has the same effect.

thank you thank you thank you! :slight_smile:

Oh, excellent links, too. Again, thanks, all. Fantastic stuff!