Autonumbers

  • Thread starter Thread starter Steven W
  • Start date Start date
S

Steven W

1. I have three tables linked and need to add new records
to each (via a form). However, while the Master table with
Primary Key as an autonumber works OK, for the other two I
cannot go to a new record ie. it will only take me to the
last record, not a blank form. I wish to 'Cascade Update
Fields' between all three and therefore I cannot use an
Autonumber in the other two fields to link to the Master
table.
 
1. I have three tables linked and need to add new records
to each (via a form). However, while the Master table with
Primary Key as an autonumber works OK, for the other two I
cannot go to a new record ie. it will only take me to the
last record, not a blank form. I wish to 'Cascade Update
Fields' between all three and therefore I cannot use an
Autonumber in the other two fields to link to the Master
table.

What's the Recordsource of your Form? Are these one-to-one
relationships? If so, examine your table design carefully: one to one
relationships are VERY rare.

Note that Cascade Updates will NOT do what you want. Its function (its
only function) is to propagate changes made to an existing Primary Key
value in one table to the linked Foreign Key (or keys). It will not
create records and will not insert a new value, and (since you can't
edit autonumbers) it is completely useless for an autonumber Primary
Key.

Typically one would use a Form for the master table, and Subforms for
the linked tables; using the autonumber field as the Master Link Field
and the foreign key (long integer) field as the Child Link Field will
cause the link to be created the moment data is added to the child
table.
 
Back
Top