Relatioships

  • Thread starter Thread starter Jason Marino
  • Start date Start date
J

Jason Marino

How do you get one table with a primary key to connect to several tables
using that table.

For example i have a location table and i have several tables that need
to use that table in order to get its location. Now it only lets me set
one of those tables with integrity but i wont let me do it with any
other tables all it allows me to do is connect to the location table as
a 0ne-to-many but i cant enforce integrity. Is there anyway around this.
 
Jason

Are you trying to connect from primary key to primary key, or are you using
the Location table's primary key value as a foreign key in those other
tables?

Are all the tables located within the same .mdb file, or are some of them
"linked", rather than "local"?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
You must make sure that your Many tables do not have key data that is not in
the One table primary key field. Use an unmatched query to check.
 
The location table has the primary key which then connecting to the
other tables foreign keys. All the tables are in the same .mdb file.
 
Jason

If you are using the Relationship window, and dragging the PK from the
one-table to the corresponding FK in a "many" table, you should be able to
set RI. This should be true every time you connect the one to the many.

When this doesn't work is when one/more of the tables are "linked", rather
than local.

Are you getting an error message?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top