Defining relationships (1 Viewer)

Rowena

Registered User.
Local time
Today, 07:48
Joined
Jul 16, 2002
Messages
27
Greetings.

I have one main table of customer info and several smaller tables that relate to it, e.g."jobs", "contacts" etc.

For some reason, when I open up the diagram of relationships, only one table shows the correct one-to-many relationship; all the others show the generic join, and I can't enforce referential integrity in any of the generic joins. I want to set it up so that if I have to delete a customer record, all the related records will automatically be deleted (this will, I hope, be a rare occurrence, but I don't want it to be a difficult process for the sake of users other than me).

When I click on the join and try to "edit relationship" it shows as "one-to-many" but I can't change the relationship type or enforce referential integrity.

Any ideas? Am I doomed to slogging through each individual table every time a customer cancels a contract? Am I doing something wrong?

Thanks in advance, :)

Rowena.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:48
Joined
Feb 19, 2002
Messages
43,329
Open each table in design view and make sure that you have defined a unique primary key. Once that is done, you will be able to create the proper relationships and enforce referential integrity.
 

Rowena

Registered User.
Local time
Today, 07:48
Joined
Jul 16, 2002
Messages
27
Thank you!

I did look at the design of each table, and I had already defined an autonumber as the primary key for each, and then when I went to the relationships screen, I was able to redefine all the relationships.

Thanks again! :)

Rowena
 

Users who are viewing this thread

Top Bottom