Display two columns in combo box

Jon Melone

Board Regular
Joined
Mar 10, 2008
Messages
109
Hi,
I have a combo box on a form that allows users to select from a list of values based on a query. In the dropdown, the two columns from the query are visible (ID, Description). But once a selection is made, only the ID is displayed in the field. How do I get the Description to display along with the ID?

Thanks in advance for any assistance,
Jon
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,
I have a combo box on a form that allows users to select from a list of values based on a query. In the dropdown, the two columns from the query are visible (ID, Description). But once a selection is made, only the ID is displayed in the field. How do I get the Description to display along with the ID?

Thanks in advance for any assistance,
Jon

Combo boxes only show the first visible column after selection. So, if you want the ID to show up with the description, then you will need to create a concatenated field in your combo's row source and make it the only visible column. You would still have the ID as the first column and then the second, instead of description, you would have something like:

IDDesc:[ID] & " - " & [Description]

and in SQL View it would be something like

SELECT ID, [ID] & " - " & [Description] As IDDesc
FROM TableNameHere

And then you set the combo's column count to 2 (as I think you already have it) and the column widths to

0";2"

or however long you need for the last one but the first column would stay at zero (0) so it wouldn't show.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top