Create a combo box list of Lastname, Firstname from a 2 field source?

  • Thread starter Thread starter Mick
  • Start date Start date
M

Mick

I'm trying to figure out if there is a way to pull a list of users form
a table so that rather than have two combo boxes LastName and
FirstName, coresponding to the Last and First names fields in the user
table, I have a combo box that is 'LastNameField, FirstNameField'? I
could setup the source field with 'last, first' but I want to be able
to access the first and last seperately.

Thanks for any input.

Mick
 
You should indeed store the first name and last name separately. Do get
them to display together, select the combo box, and click View > Properties.
Click the Data tab, click Row Source, and click the three dots at the right.
Add the table. If you are storing the PersonID (the primary key field) add
that to the query design grid. In the first empty column to its right, put:
LastFirst: [LastNameField] & ", " & [FirstNameField]
Use whatever name you want for the new field. Sort ascending, if you wish.
To store the primary key, set the bound column (Data tab) to 1. Click the
Format tab; set the column count to 2 and the column widths to 0";1.5".
 
Back
Top