How does Access change primary key value in RI relationship?

  • Thread starter Thread starter Dean Slindee
  • Start date Start date
D

Dean Slindee

We are using .adp projects. Lookup tables typically have a single field for
the key to a lookup table that populates combo box lists.

These lookup values are stored "as is" in the detail data tables, and RI'd
back to the lookup tables. Example: lookup table primary key values for a
Color table, primary Key (ColorID): Red, Brown, Blue, Green, etc.

Data table has a column named ColorID that is RI'd to lookup table, with
Cascade Update ON.

What or how does Access do underneath the covers when I change the "Red"
value in the lookup table to "Rust"?
I want to be able to do the same process in VB.NET (change primary key
value), rather than do a Insert/Delete, rebuild RI and Cascade Update
settings.

Thanks,
Dean S
 
DS> These lookup values are stored "as is" in the detail data tables, and
DS> RI'd back to the lookup tables. Example: lookup table primary key
values for
DS> a Color table, primary Key (ColorID): Red, Brown, Blue, Green, etc.

DS> Data table has a column named ColorID that is RI'd to lookup table,
DS> with Cascade Update ON.

DS> What or how does Access do underneath the covers when I change the
DS> "Red" value in the lookup table to "Rust"?

Nothing. Cascade update is performed not by Access but by the database.
Access changes the field, database server notices and updates all related
fields in child tables. The same will happen if you change it with any other
application, including vb.net, so no programming effort is required from
you.

Vadim Rapp
 
Back
Top