Hello, I have a question. I'm not sure I understand how Access knows which value to store when a multiple column combo box is used? For example, in video 4 of the Expert level 1 class, the columns in our combo box on the Contact form are Customer ID, First Name, Last Name and Company. We hide the Customer ID - primary key field. We select a customer name using the combo box, but the ID is what gets saved to the Contact table - even though we never explicitly told Access to do this. How does Access know to save the ID rather than the name? This doesn't seem as straight-forward as when a query (rather than a table) is the source for a combo box. Thanks in advance for your help! M.
Reply from Alexander Hedley:
Hi Michael, By Default a Combo's column choice is always the 1st Field, so you have your ID as the first field, usually hidden, then your display fields next. Check the 'Bound Column' Property in the 'Data' tab. You can use the .Column(#) changing the # to the column number you want. Try a MsgBox and change the # to see what value is shown.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 1.