Results 1 to 3 of 3
  1. #1
    MelT is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    5

    Have an audit trail/log in Access 2010 but also need to prompt a user to confirm changes before Save

    I've built an audit trail table to track changes to a form. Is it possible for me to add code to also ask a user to confirm any changes they make to a record? Where would I place the code?



    Here is the code I currently have in place for my form and the Event Procedures Before Update and After Del Confirm.

    Option Compare Database
    Option Explicit

    Private Sub cmdQuit_Click()
    DoCmd.Quit
    End Sub

    Private Sub Form_AfterDelConfirm(Status As Integer)
    If Status = acDeleteOK Then Call AuditChanges("ID", "DELETE")
    End Sub

    Private Sub Form_BeforeUpdate(Cancel As Integer)
    If Me.NewRecord Then
    Call AuditChanges("ID", "NEW")
    Else
    Call AuditChanges("ID", "EDIT")
    End If
    End Sub

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    You may get more info from Allen Browne's audit material
    Since you are using Acc2010, you may find this Data Macro info useful.

    Also, you mention changes to a form, but it is really using Form events to audit changes to data in tables, right?

  3. #3
    MelT is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    5
    Yes, my table of customers is connected to a form. If someone edits the customers record in that form the audit table tracks those changes.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. New to Access, need help setting up an audit trail
    By kwp6353 in forum Programming
    Replies: 6
    Last Post: 01-12-2017, 08:11 AM
  2. Access 2010: Audit Trail not Working in Subform
    By besuchanko in forum Programming
    Replies: 19
    Last Post: 11-12-2015, 03:47 AM
  3. Replies: 1
    Last Post: 09-01-2015, 02:01 PM
  4. Replies: 2
    Last Post: 02-09-2013, 12:39 PM
  5. Audit Trail - Pull User Name From Table, Office 2010
    By brharrii in forum Programming
    Replies: 2
    Last Post: 06-05-2012, 03:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums