Before Update OR After Update

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

Guest

Is it best to kick off my code in the Before Update Event OR After Update
Event? My code will not modify the data entered in the field by the user. I
do typically use the value entered in the field to establish my next steps
(if statements). I will also write the user ID and date to fields in the
table for audit purposes.

Thank you for your help.

David
 
It's not a matter of what's best! Each has it's purpose. BeforeUpdate is
typically used to validate the data that was just entered and if there is a
problem, you can Cancel (and Undo). Cancelling keeps the data from being
saved and keeps you from moving to the next field. AfterUpdate is used for
what you call "establish the next steps". The old data (or Null) has been
replaced by the new data and the AfterUpdate event can be used to do
something with the new data. BeforeUpdate always precedes AfterUpdate and
cancelling BeforeUpdate prevents the Afterupdate event from firing.
 
Back
Top