Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


thread702-1740468 I have been ab

thread702-1740468 I have been ab

thread702-1740468 I have been ab

thread702-1740468: Audit trail in Access 2013

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!!

RE: thread702-1740468 I have been ab

Honestly, the code with the way pasted in the other thread is a pain to read.

When you say you want to capture the ID for the record deleted, then basically, you should just make sure you do something to this extent:
1. Build a query that captures all the details about the record to be deleted, and use that query as recordsource to add a history/audit trail record.
2. Use same query or build similar query to delete said record.

I didn't bother trying to dig through all the code, because I don't really have time. If you want to get into specifics, then post what you're trying to use so far here, and I'm sure someone can help show you where the problem lies.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close