need help in creating table

G

Guest

Employee Table

Employe ID AutoNumber
Primary Name Number
Secondary Number

when i input NO.1 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.

so when i create a Form it shows persons Name in it but in the back it will
have Number.

Primary Name Secondary Name
1 3

5 6

WHERE 1 (ABC )
2 (DEF) AND SO ON
 
J

Jeff Boyce

I'll hazard a guess that your table uses a "lookup" type field, displaying
one thing (name) while storing something else (an ID#).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

I am sorry i think i didnt make myself quite clear.

employee
1 abc
2 def
3 grfg
4 bncmf

so when i create a form it should take value from my table

Primary Name Secondary Name
Drop down menu has list of employes to select from

Both the field has same list of employe’s, and also where do I input list of
employes so I takes the values from there.

Thanks,
 
G

Guest

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

Jeff Boyce

I'm not sure I'm understanding what you mean by Primary Name and Secondary
Name, nor how you are using a drop-down menu.

If you are using a form, you can use a combo box to select a person, and
store the PersonID in the table on which your form is based. You would NOT
need to store the person's name, as this would be redundant. You would only
need to store the PersonID, and to use a query to join the PersonID back to
the PersonName.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John W. Vinson

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.

You should use a Form to do this. Table datasheets are not designed
for data entry, except in a very crude way.

You can base your Form on this table, and put two combo boxes on the
form - one bound to the Primary ID field, the other to the Secondary.
Both combo boxes would use the Employee table as the combo's row
source, or to be more precise, use a Query sorting the employee table
by name.

The Combo Box Wizard will walk you through adding the combo boxes.


John W. Vinson [MVP]
 
P

Pat Hartman \(MVP\)

The list of employees that the combobox will show should come from the
employee table. The combobox wizard should walk you through the process of
creating a combobox and setting all the necessary properties. But if you
need to do it manually, here is a list of the minimum number of properties
(*) you need to "touch".
DataTab:
1. *RowSource/RowSourceType - in your case should be a query of the employee
table to select just the employeeID and the employee full name.
2. *BoundColumn - usually column 1. It should be the column of the
employeeID.
3. LimitToList - usually set to Yes to prevent people from typing in their
own values.
FormatTab:
4. *ColumnCount - very important. Must be the count of the columns selected
in the RowSource query.
5. *ColumnWidths - if the first column is the ID, you will want to hide it
so the column widths will be 0";2"
If 2 is too wide, use a smaller number. If it is too narrow, use a larger
number.
6. When you have a number of columns that you are showing in the combo, you
may want to set the ColumnHeads property to Yes.
7. Likewise, if you want the drop down to be wider than the closed width,
set the ListWidth to the number of inches that you need to show all the
columns.
 
G

Guest

Thanks a Lot Pat this is exactly what i was looking for. I really appreciate
your help
 

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