thread702-1740468
I have been able to make the code work except for record deletions where a record gets created in the AuditTrail table but the record number for the deleted record, does not show up. I am wondering if it is because the sub calling AuditChanges is located in AfterDelConfirm event of the form, with the record number having been deleted before the AuditChanges is called. I could put the sub in the OnDelete event instead. Of course, if the user does not confirm the deletion, I will end up with a "fake" audit trail record. Or should I capture the record ID in the OnDelete event but only call AuditChanges in the AfterDelConfirm event? How would I transfer the information between the 2 events though? Thanks!!
I have been able to make the code work except for record deletions where a record gets created in the AuditTrail table but the record number for the deleted record, does not show up. I am wondering if it is because the sub calling AuditChanges is located in AfterDelConfirm event of the form, with the record number having been deleted before the AuditChanges is called. I could put the sub in the OnDelete event instead. Of course, if the user does not confirm the deletion, I will end up with a "fake" audit trail record. Or should I capture the record ID in the OnDelete event but only call AuditChanges in the AfterDelConfirm event? How would I transfer the information between the 2 events though? Thanks!!