Linking fields

K

keef2008

I have two tables, table1 and table2.

table1 contains a list of names and numbers, in two fields.

table2 contains details jobs against names and numbers, the names and number
fields will be linked to the corresponding fields in table1. I want to link
the names and number feilds in table2 - so that when you select a name in
table2 the associated number from the same record in table 1 is
selected...and visa versa if possible...i'm very much a novice and dont know
how to do this.
 
D

Damon Heron

Hard to tell from your description, but it sounds like you have duplication
of data in tables 1 & 2.
How about this:

Table 1:
table1ID (autonumber)
Name (text)
Number (number)

Table 2:
table2ID (autonumber)
jobDetails (text)
table1ID (number) --foreign key to table 1

This would give you a one to many relationship between the names in table1
to the jobdetails in table2.
Since I have no idea what you are trying to accomplish, it is difficult to
expand beyond this.

Damon
 
K

keef2008

Sorry - i'll re-explain....

I have one table containing just site names and site codes. table1

I have another table containing specific details for a job. table2

I have one form for entering jobs.

Each time i add a new job record using the job form i want to be able to
select the site name using a combo box, then i want the site code to it to
automatically appear.

Alternatively - if i select the site code, the site name should
automatically appear.

I've been hunting about and found some threads that explain using queries to
do this, but i cant get it to work...

I'm sure it is simple though......
 

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