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

    Unhappy Audit Trail that works with passed through values.

    I'm currently using the Martin Green Audit Trail found at http://www.fontstuff.com/access/acctut21.htm. I have run into a situation where this does not work and I'm hoping someone here will be able to knock some sense into me.

    I'm using a second form for editing text in text boxes that are too small on form 1 (I'm doing this vice the Shift+F2 method because the textbox provided by the system is still too small and lacks control). When I use the text editing form I use openargs to pass info back and forth from the text box on form 1 to the text editing form.

    The problem is, when values are changed using the text editing form, the value passed back to form 1 isn't recorded on the audit trail.



    Is there another audit trail that will work with values that are passed through from another form? I was thinking of using a table level audit trail using data macro's but I'm not sure if all that set up will work or not.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If the second form is saving the data to the table rather than passing it back to the first form, couldn't you add the audit trail code there?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    The second form is only passing the information back to form1 where it came from I wouldn't know how to get one form to dynamically save to different fields on a table..... Hi Paul! Thanks again for all your help!
    Last edited by lccrews; 12-18-2017 at 02:26 PM. Reason: Answered Paul's question

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Then I would expect the before update event of the first form to pick up the changed data. That assumes that form is bound, as is the textbox the data is put into.

    Hi back! I'll be passing through LAX on my way to NZ next year.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    That's what I expected too, but even with the BeforeUpdate event written, the new value isn't recorded on the Audit Trail. I'm using the same BeforeUpdate event listed from www.fontstuff.com (Martin Green Audit Trail).

    For example: I double click the form field I want to edit (Bl01) and the text editor pops up with the value from Bl01. When I change something and hit ok, the value passes back through to Bl01, but it doesn't look like any event is triggered. When I hit save changes and check the audit trail nothing is there. But when I make a change directly to Bl01, it works fine.

    Should I post a copy of what I'm using for you to see?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Yes, that might help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    Here's a copy of my database (a trimmed one).

    I'm using the Form_BeforeUpdate code:
    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
        If Me.NewRecord Then
            Call AuditChanges("MBRID", "NEW")
        Else
            Call AuditChanges("MBRID", "EDIT")
        End If
    End Sub
    For my test, I used the Blending Tab and worked with field Bl01.
    Attached Files Attached Files

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You aren't passing the value back and forth, frm_TextEditor is bound to tbl_MBR. You pass the field to bind the textbox to in OpenArgs (which I recall perhaps suggesting). Adding the audit code to that form's before update event appears to work.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    Paul, you did suggest this! Adding the code to the BeforeUpdate event of frm_TextEditor worked. Thanks again! Enjoy your trip to NZ! If you have a long layover, post here and I'll come buy you a drink!

  10. #10
    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

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Quote Originally Posted by lccrews View Post
    Thanks again! Enjoy your trip to NZ! If you have a long layover, post here and I'll come buy you a drink!
    Happy to help! We've got a daughter living there, so this will be our third trip to NZ. Unless flights change, at this point we have a layover each way, but not really long enough to leave the airport, do stuff, and then get back and go through a long security line. Thanks for the offer though! If you want cocktails at LAX, we're in!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    Ok Paul, just send me a message crews.landon at gmail a day or so ahead. Your drinks are on me!

    Orange,
    No this issue had to do with my audit trail not picking up the values that were being passed through from another form. That issue occured because I had 'audit' listed at the form level and not the control level.

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    What, do you live down the street or something? My brother lives in LA and he won't drive to LAX to see us.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    I live in Northridge (25min away). However, I'm very grateful that you've continued to help me on this project of mine. If it's after working hours, I'd like to return the favor. Plus, I ride a motorcycle, so traffic is nothing to me.

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

Similar Threads

  1. Audit Trail Help
    By HelpDesk in forum Access
    Replies: 9
    Last Post: 08-07-2015, 06:13 AM
  2. Audit Trail
    By zburns in forum Access
    Replies: 4
    Last Post: 07-27-2015, 08:49 AM
  3. Having an audit trail
    By ryanmce92 in forum Modules
    Replies: 5
    Last Post: 06-03-2015, 02:29 PM
  4. Replies: 2
    Last Post: 02-09-2013, 12:39 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