Create Table / ComboBox

G

Guest

I have a list of employes that are repeted in my database so i am creating
this table so i need not type in the name
again and again

Employee Table

Employe ID AutoNumber(make width zero so others can only see two columns)
Primary Name Number(but should show only text in form)
Secondary Name Number(but should show only text in form)

in Primary Name it should show me Persons name in the drop
down menu where i can select the name. Same list of Name will show up in
Secondary Name.

Primary Name Secondary Name
1 3

5 6

WHERE 1 (ABC )
2 (DEF) AND SO ON
employee
1 abc
2 def
3 grfg
4 bncmf

it should lookup in employee table and fill in the values in Primary Name
drop down menu should show name of person but when it selects that name from
my employee table it should save as number value in that field where vaue of
1, 2,3,4,5,.....should be persons name.

LOOKUP COMBO BOX
What should be Row Source Type (should i take it from table or input it
manually but if i input from table it shows duplicates too)
Row Source (write list or can be imported ? )

I have been trying to do this from last 3 days i have an idea what i want to
do but dont know how to do it.

Your help is greatly appericiated

Nisha P
 
G

Guest

Hi

Not really sure about the names to number thing - bit strange that.

The combo could be based on a totals query taken from the employee table.
Total the employee ID this way you will only get occurance of each person.
Don't base the total on the name as you may have 2 people with the same name.
Use the ID field.

Hope this helps
 
J

John W. Vinson

LOOKUP COMBO BOX
What should be Row Source Type (should i take it from table or input it
manually but if i input from table it shows duplicates too)
Row Source (write list or can be imported ? )

I have been trying to do this from last 3 days i have an idea what i want to
do but dont know how to do it.

Strong suggestion:

Don't use Lookup fields - AT ALL. EVER.

See http://www.mvps.org/access/lookupfields.htm for a critique.

Table datasheets are NOT suitable for data entry or editing. Table are
data repositories; use Forms in order to interact with your data.

You can very easily put two combo boxes on a Form bound to these two
numeric foreign key fields. Each combo box should be based on a Query
of the Employees table, which (I hope) has just one record per
employee. The Bound Column would be the EmployeeID, but that column
would be of zero width in the ColumnWidths property of the combo box;
the employee name would be the only visible column.

If this isn't clear, please describe the other tables in your
database. DO you in fact have an Employees table with one record per
employee...!?

John W. Vinson [MVP]
 

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