Results 1 to 8 of 8
  1. #1
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194

    My Audit Trail Isn't Woking

    I'm trying to figure out why my audit trail isn't working. When I edit a record from the form, no 'edit' record is added to tbl_AuditChanges. There are no error messages. I've attached the relevant forms from my database to see if someone can spot anything I might have done wrong. Frm_MBRSelect will ask for a parameter to open it. Please use 'C00001'. I set the library to accept 2.8 objects, I made a global module for the code, I placed the 'audit' tag, I inserted the before update event on the form, and yet nothing happens when I edit a field on the form.



    I have also noticed that when all fields are blank, the code works! A record is added with action 'New'. Why doesn't it work when 'editing' current records?
    Attached Files Attached Files
    Last edited by lccrews; 08-31-2017 at 03:24 PM. Reason: Further troubleshooting comments. and adjustment per John_G's and RuralGuy's comments.

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I'm trying to figure out why my audit trail isn't working.
    You'll have to give us more information than that! What does "not working" mean? You get an error message? No records are added to the table? Wrong data is added?

    I can't test the database you posted - it is missing the form Frm_MBRProcess, which Frm_MBRSelect references in its record source query.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    The form Record Source is trying to look at missing Form [Forms]![Frm_MBRProcess]![Text29].

  4. #4
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    I've made adjustments to my post to answer your questions. My apologies for not being clear and not providing information on how to use the form. It's linked to another form where a search box resides.

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Your sub AuditChanges cycles through all the controls on the form looking for one with "Audit" in the tag.

    The problem is - there isn't one. None of them have anything in the tag - so no record ever gets added to AuditChanges.

  6. #6
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    Thank you for the help John_G... That did the trick. I thought placing 'audit' at the form level would have a trickle down effect. That wasn't the case. You're a life saver!
    Last edited by lccrews; 08-31-2017 at 03:59 PM. Reason: Sentence was fragmented.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    lccrews,

    You may get some ideas from this thread

    I had issues with the Martin Green audit trail when helping PSS Margaret to deal with subforms. See post #43 in that thread for summary info.

    Good luck.

  8. #8
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    Thank you orange, I did find that useful. I can use that if I have to use subforms, which I may end up having to do.

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

Similar Threads

  1. My Audit Trail Isn't Woking
    By lccrews in forum Access
    Replies: 5
    Last Post: 08-28-2017, 05:05 PM
  2. Audit Trail
    By zburns in forum Access
    Replies: 4
    Last Post: 07-27-2015, 08:49 AM
  3. Replies: 2
    Last Post: 02-09-2013, 12:39 PM
  4. Audit Trail
    By bigroo in forum Programming
    Replies: 4
    Last Post: 02-22-2012, 07:55 PM
  5. audit trail
    By slimjen in forum Forms
    Replies: 1
    Last Post: 10-13-2011, 01:52 PM

Tags for this Thread

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