[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

Access Display two fields in ComboBox

Hi

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?
0
Murray Brown
Asked:
Murray Brown
  • 2
2 Solutions
 
mbizupCommented:
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)
0
 
mbizupCommented:
Correction - I left out the combo reference:


= Forms!YourFormName!YourComboName.Column(0)

Open in new window

0
 
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).
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now