Displaying 2 columns once selected

Is it possible to display 2 columns when an item is selected?  

Right now, when you select from the list, only the last name will display at the top (not last | first - as the list itself does) - see screenshot.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
Or simply make the rowsource for the combobox a query the combines the First and Last Names:

Select NameID, LastName & ", " & FirstName AS FullName From YourTable

Jeffrey CoachmanMIS LiasonCommented:
No, not in the combobox.

You can do this with two textboxes with the controlsources set to the respective columns of the combobox:
Here the PK is the first Field which is Column(0)
LastName is the second column (cboName.Column(1))
FirstName is the third column (cboName.Column(2))
gcgcitAuthor Commented:
Do you have a sample database of this boag2000? I'm not quite clear on how to do this from above.
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Rey Obrero (Capricorn1)Commented:
the trick here is to superimposed an unbound textbox over the combo.

in the afterupdate event of the combo box, place this codes

Me.txtUnbound.Value = Me.cboName.Column(0) & " -  " & Me.cboName.Column(1)
gcgcitAuthor Commented:
so your interface will show a textbox that is "uneditable" and the combobox fills it?
Jeffrey CoachmanMIS LiasonCommented:
Well I don't know the specific or your Data.

Remember that your question here requires that you have a basic understanding of how to set these properties...
Besides it is not clear what the combobox is doing after the Name is selected.

Give it a try on your own first before you decide that you can't do it..
Open the properties of the combobox and try building the SQL I posted.
Set the Rowsource as something like I posted above.
Then set the ColumnCount to: 2
Set the ColumnWidths to : 0,1

Jeffrey CoachmanMIS LiasonCommented:
see this sample
Rey Obrero (Capricorn1)Commented:
<so your interface will show a textbox that is "uneditable" and the combobox fills it?>

gcgcitAuthor Commented:
Changed the query

Name: [tblPeople].[txtLastName] & ", " & [tblPeople].[txtFirstName] - changed column count from 3 to 2. Voila.  Idea from boag2000 came first and was what intiated this change (slight modification to what expert suggested).
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.