Table and Form Structure

B

BIll Mills

I have a table, I'll call table A, that stores a value called TrainerID and
another called ContactID. I have a second table, I'll call table B, that has
a contactID and information such as first name, last name, address, city,
state, etc. There is a one to one relationship between table a and table b.
Each person in table A has one contactID and one trainerID both pointing to
the contactid key field in table b. My question is how can I set up a
relationship and form so that I can pick a contactid and a trainerid
seperately and populate with appropriate data?
 
D

Dirk Goldgar

BIll Mills said:
I have a table, I'll call table A, that stores a value called
TrainerID and another called ContactID. I have a second table, I'll
call table B, that has a contactID and information such as first
name, last name, address, city, state, etc. There is a one to one
relationship between table a and table b. Each person in table A has
one contactID and one trainerID both pointing to the contactid key
field in table b. My question is how can I set up a relationship and
form so that I can pick a contactid and a trainerid seperately and
populate with appropriate data?

Are these really one-to-one relationships (one relationship for
A.TrainerID, and one for A.ContactD)? Or are they one-to-many
relationships between table B and table A? Can a record in table B be
referred to by more than one record in table A?

The form for editing table A would probably use combo boxes based on
table B to choose values for the TrainerID and ContactID fields. To
show the related info from table B on this form, you could either
include that info as columns in the combo boxes, and set up calcualted
text boxes that draw their data directly from those columns, or else
base the form on an "autolookup" query that joins table B to table A
(twice -- once for each field) and selects the fields from table B along
with those for table A.
 
Top