MS Access: Display two columns in combo-box

Viewed 21364

Embarrassingly simple question but I can't work it out or find the answer via google.

Got something like this with two colums

contacts dropdown

But when selected it only displays one column, making the information much harder to read/ understand.

contact

Tried changing properties in property sheet (such as column number) but to no apparent effect.

3 Answers

You can also use a visual workaround for this Access limitation, using a text box at the right of the combobox, and setting the textbox value equal to the third column of the combobox.

If the combobox is based on

SELECT [Contact].[CID], [Contact].[Csname], [Contact].[Cfname] 
FROM [Contact] ORDER BY [CID], [Csname], [Cfname];

Set column width equal to 0cm;5cm;6cm (or whatever you may need) and combobox width equal to the second column (5cm). Then create a new text box at the right of the combobox, without any space in between, set its width equal to the third column (6cm) and set textbox controlsource equal to:

=[combobox_name].[Column](2)

Textbox will not be modifiable by the user since it is associated to a control source.

Related