recording cascade update

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have some vba that records changes to the values of controls on a form
(before update event). this code is on both main and (correlated) sub-forms.
when i use change a pk (e.g. "Patient Number") on a main form the change's
recorded in the designated memo length field, but i didnt' find the same
thing on the sub-form. is this just the nature of things or do i need to
augment my code?
 
Those changes won't get caught because they're not triggered by form events,
which is what your VBA is looking for. I think you'd need to lose the
cascades and replace with update queries triggered by the change on the main
form. After you run those, then you'd have to modify them to write the
relevant information to your audit table.
 
the Registration form is the "master" identifier wherein a Patient (via
his/her Patient Number) gets identified into the database. there is a cascade
update relationship which is available w/in each relationship it has w/ every
other table (some of which in turn have this folded into their own
relationships w/ their respective sub-forms); ergo a change to the PN in the
Registration form has global consequences. while the memo length field in it
records the said change to the PN we said that the ripple-effected change
downstream is somehow coming in below the radar. what i'm not getting at all
from your reply is what you have in mind (code-wise) -- even in broad terms.
sorry...
 
What I'm suggesting is...

Turn off the cascades.
Catch an edit of the 'one' table.
Use an update query to recreate the effect of the cascade.
Run another query (probably an append) to write your audit data to where you
want.
 
Back
Top