View Single Post
  #5  
Old April 21st, 2010, 01:49 PM posted to microsoft.public.access.gettingstarted
Marsh
external usenet poster
 
Posts: 108
Default Primary Key Cascade Question

Three very informative answers, and I shall work on this today. If problems
arise, I will be back tomorrow.
Thank you all

"SQLGal" wrote:

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


.