Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS Access: Display two columns in combo-box

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.

like image 802
user137263 Avatar asked Aug 01 '12 15:08

user137263


People also ask

How do I show two columns in combobox?

Combo Box Settings To show two columns in the combo box, open its property window, and change its ColumnCount setting to 2. When you double-click on a data validation cell, event code runs, that finds the list used in the data validation cell. Then, “Full” is added to that name, to find the list for the combo box.

How do I create a cascading combo box in access?

To create the cascading combo box, we add code in the "AfterUpdate" event for the Kingdom combo box, to update the RowSource property of the Phylum combo box based on the selected Kingdom. After updating the RowSource property, use the list box's Requery method to re-load the data in the ListBox.

How do you add two column values in access?

On the Home tab, in the Records group, click Totals. A new Total row appears in your datasheet. In the Total row, click the cell in the field that you want to sum, and then select Sum from the list.


1 Answers

It depends to a certain extent on what you are doing, often something like this suits:

SELECT Id, Surname & ", " & Forename from Table

In other words, the bound column is a unique ID and the selection column includes both the surname and forename in a single column.

EDIT based on additional information:

SELECT [Contact].[CID], [Contact].[Csname] & ", " & [Contact].[Cfname] 
FROM [Contact] ORDER BY [CID], [Csname], [Cfname];
like image 63
Fionnuala Avatar answered Jan 02 '23 20:01

Fionnuala