Drop Down List Question

G

Guest

Hi

I run Win2000 with Access 2000. I have created a table & form which has an
entry of a "First Name" and an entry of a "Surname". I would like to have a
combo box on another form that shows the entire name (First namd and Surname)
and allows selection of it. At present I can create a combo box that shows
the two names together but when I select it, it only displays the first name.
I know that if I created a table that had the First Name and the Surname
combined that this would overcome it but I was wondering is it possible to
have the two entries separate and be able to bring them together some way in
a combo box in another form?

Any help would be much appreciated.

Thanks

John
 
G

Guest

In the row source of your combo box, create a new query, using the table with
your names. Add the following as a field in the query:
Name: [First Name] & " " & [Surname]
 
P

PC Datasheet

John,

You have to base your combobox on a query. I'm going to presume your table
looks something like this:
TblEmployee
EmployeeID
FirstName
SurName
etc

Create a query vased on TblEmployee. In the first field put EmployeeID. Put
the following expression in the second field:
Employee:[FirstName] & " " & [Surname}

For your combobox, open properties and go to the data tab and set the
rowsource property to the name of the query. While still at the Data tab,
set the bound column to 1. This makes the combobox always have the value of
EmployeeID for the name selected in the combobox. Go to the Format tab and
set Column Count to 2 and column widths to 0;1.5. This makes the value of
EmployeeID (Column1) not display and makes Employee (Column2) display.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.
 
S

StopThisAdvertising

PC Datasheet said:
Over 1000 Access users have come to me for help. My fees are very
reasonable.

--
Most people here have a common belief that the newsgroups are for *free exchange of information*.
But Steve is a notorious job hunter in these groups, always trying to sell his services.

Before you intend to do business with him look at:
http://home.tiscali.nl/arracom/whoissteve.html (updated)

Arno R
 

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