Creating a combo box or drop down list?

G

Guest

Here is my dilemna. I have one table which has a list of all the employees
from a company. This list is over 1500 names long and was imported from
another database(not access). This table does not have a primary key because
some of the information is duplicated because of married names and maiden
names. I need to take the info from this table and create a form. On this
form I only want to select the first name and last name of the employee, and
have the system automatically input the corresponding fields. Is there a way
to do that and if yes how?
 
G

Guest

You mentioned entering this on a form, do you mean also that you are putting
the data into another table?

In order to do this, create a form based off your new table. Create a combo
box off your first table (1500 names) bound to your last name field and
include all fields that you would want to input in the new table. You do not
need to show all the fields (by setting the width in properties to zero) but
they do need to be included in the column count of your combo box. Then, on
the AfterUpdate property of your combo box put the code similar to the
following:

Me.FirstName = Me.ComboBoxName.Column(1)
Me.Address = Me.ComboBoxName.Column(2)
Me.City = Me.ComboBoxName.Column(3)
etc...

Where the column count starts at zero for the first field.

Hope this helps.
 
G

Guest

Jackie,

Thanks for the reply, but for me its too much information to digest. I need
the simple step by step directions.
 
Y

yangxiaoming

Jackie L said:
You mentioned entering this on a form, do you mean also that you are putting
the data into another table?

In order to do this, create a form based off your new table. Create a combo
box off your first table (1500 names) bound to your last name field and
include all fields that you would want to input in the new table. You do not
need to show all the fields (by setting the width in properties to zero) but
they do need to be included in the column count of your combo box. Then, on
the AfterUpdate property of your combo box put the code similar to the
following:

Me.FirstName = Me.ComboBoxName.Column(1)
Me.Address = Me.ComboBoxName.Column(2)
Me.City = Me.ComboBoxName.Column(3)
etc...

Where the column count starts at zero for the first field.

Hope this helps.
 

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