View Single Post
  #4  
Old April 20th, 2010, 10:00 PM posted to microsoft.public.access.gettingstarted
SQLGal
external usenet poster
 
Posts: 1
Default Primary Key Cascade Question

Marsh,

Go into relationships and set up relationships between all of the tables.
Set the join as one-to-many (parent-to-child), enforce referential integrity
and cascading updates and deletes.

Also, I like to set the join type to all records in the parent and only the
matching in the children. You don't have to do this but it is a good way to
view parent records without children.

Also, it is best to set this up before you have entered data. If you get an
error while setting it up, I can help you with that.

Finally, this set up will cause cascading updates and cascading deletes. The
database will provide a warning and tell you how many records are being
updated or deleted.



Marsh wrote:
In an Access 2007 db, I have 5 tables, with Proj_No the Primary Key field in
the main table tblProjID. It has 7 additional fields.
It will be benificial to have Proj_No in the other 4 tables as foreign key
fields. My question is, when a new Proj_No is entered into the main table
to create a new record, how can I get that entry (alpha-numeric) to cascade
to the other 4 tables, thus creating a new record in the 4 child tables.

Thank you
Marsh