Combo box with multiple fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have created a Combo box from a Names table. The Names table is comprised
of Last and First. I would like to select by last name and have both the
last and first name display on the form.

For example, I select Smith, John and only Smith displays.

Thanks in advance.

TD
 
Change the combo's RowSource property as follows:
SELECT PersonID, LastName & ", " & FirstName As FullName
FROM tblPerson
ORDER BY LastName

Then set the combo's ColumnCount property = 2, and its ColumnWidths property
= 0cm;3cm (yes, I use metric).

Of course, change the field names, table name, and measurement units to suit
your application.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Back
Top