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

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
 
B

BruceM

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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top