View Single Post
  #2  
Old April 20th, 2010, 08:33 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Primary Key Cascade Question

On Tue, 20 Apr 2010 12:00:01 -0700, 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.


Don't.

It's neither necessary nor helpful to have empty "placeholder" records in your
related tables. If you use a Form based on the main table, with Subforms for
your related tables (using Proj_No as the Master/Child Link Field), the
Proj_No will fill in when you add data to the child table. That's when you
need the foreign key - when there is data to link, not before.

If you're adding data in table datasheets, don't! Tables are VERY limiting and
(despite Microsoft's blandishments) inappropriate for data entry or editing.
Forms are much more powerful and flexible.
--

John W. Vinson [MVP]