Access Display two fields in ComboBox


I have a field in a bound form called "Template"
I have changed it to a ComboBox and want it to get data from a table called Templates which contains fields ID and Desciption
I want the user to see both the ID and description in the ComboBox and populate the bound table with the ID
How would I achieve this?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
Correction - I left out the combo reference:

= Forms!YourFormName!YourComboName.Column(0)

Open in new window

One way to do this is to create a combo box to select both fields, storing the ID and displaying the text (you probably already have this created on your form.  Then add an unbound textbox and set it's control source property to:

= Forms!YourFormName!YourColumn(0)

(include the = sign, and change the column number if needed to display the value of the correct column)
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Note that when the user drops down the combo, they can see all column values if you set the ColumnWidths appropriately, but when the user selects a value, only the Bound Column value will be shown (you can use the technique suggested by mbizup to show the other values).
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.