Combo Box

G

Guest

I have a combo box with the row source set to a query giving 3 fields(pk,
firstname, lastname)

I have hidden first column and set widths of second columsn, this looks fine
in the drop down list but when I select an option and it displys it in the
combo box it only displays the first name.

Does anyone know how to make it display both names?
 
G

Guest

If you still want the first name and last name to appear seperately in the
drop down list, then change the RowSource SQL to select 4 fields (pk,
firstname & " " & lastname, firstname, lastname), and change the columnCount
to 4 and set the 2nd column width to 0.1.

You should see that the drop down list is as before (firstname, lastname)
but, when you slect an entry, the two names now appear in the text box.

If the want the drop down list to also show first name and last name as a
single column, then change the RowSource SQL to select two fields (pk,
firstname & " " & lastname) and change the column count to 2.

Hope This Helps
Gerald Stanley MCSD
 
G

Guest

What do you want the bound column to be? i.e. which column do you want the
combobox to equal?

If it is pk, then there is no need to seperate first and last name is there??
Have the query of the row source have 2 visible fields:
pk, [firstname] & [lastname]

You can then have a hidden field if you want it sorted by a third field (eg
surname). You don't need this if you want it sorted by firstname or pk - just
do it in the visible fields.

Does this help?

Basil
 

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