Relationships

G

Guest

I'm still having trouble relating 3 tables.

My main table is Student Information
My second table is Sports Information
My third table is Medical Information

I would like to open the Student Information table, then click on the + and
access the other 2 tables. How can I do this.

Also, how to I set a foreign primary key.
 
J

John Vinson

I'm still having trouble relating 3 tables.

My main table is Student Information
My second table is Sports Information
My third table is Medical Information

I suspect you need more tables. If the "Sports Information" table has
one record for soccer, another for vollyball, a third for tennis, etc.
then you need a "resolver" table to link the Students table with the
Sports table. You'ld use a Form with a Subform based on this table.
I would like to open the Student Information table, then click on the + and
access the other 2 tables. How can I do this.

By using a Form with two Subforms. Table datasheets are of VERY
limited utility.
Also, how to I set a foreign primary key.

While it's possible to have a field serve as both a foreign key and a
primary key (in a one-to-one relationship), it's unusual and probably
not what you mean. You can use the Relationships window - looks like
three datasheets joined by lines on the toolbar - to create
relationships between tables. If you drag the StudentID field from the
Students table to the StudentID field in the SportsEnrollment table
suggested above, that field will become (by the way you're using it) a
foreign key. It isn't distinguished visibly in the table design or
datasheet windows; it's just a matter of the manner in which you're
using it.

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