Making sure all changes are caught

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a detail subform. I need to track any change to a record i.e.
addition, deletion or change so I can update the totals. What events do I
need to trap on the sub form?

Thanks

Regards
 
John said:
Hi

I have a detail subform. I need to track any change to a record i.e.
addition, deletion or change so I can update the totals. What events
do I need to trap on the sub form?

I'm not convinced that you should need to update any totals -- shouldn't
they all be derived from a query or an aggregate function? But if you
do need to catch all updates, the subform's BeforeUpdate, Delete, and
AfterDelConfirm events are probably what you need. BeforeUpdate will
catch the saving of new records as well as edited ones. The Delete
event will allow you to tabulate data from each individual record that
is deleted, while the AfterDelConfirm event lets you determine whether
those records were really deleted, or whether the user cancelled the
delete.
 
Back
Top