How to detect changes in Access form fields?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmartmem
    New Member
    • Feb 2008
    • 87

    How to detect changes in Access form fields?

    Greetings,

    I have an Access 2002 form with a number of comboboxes, text boxes, options groups and the like. My goal is to somehow identify specific changes to the form's fields after a user has changed any column or control.

    I've already coded a BeforeUpdate event procedure to the form such that when the form changes, a timestamp is populated in a textbox. Here's that code:
    Code:
    ' The Dirty property is True if the record has been changed.
    If Me.Dirty Then
      ModifiedDate = Now()
    End If
    This allows me to identify whether the record has changed but not what specifically changed. It's conceivable that the user could update any number of columns and controls, so my challenge is to determine what event procedures to code so that, after the fact, I can view the exact changes the user made.

    Anyone's suggestions would be most appreciated.
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    You're talking about creating an audit trail. This is not a task for the faint of heart; there are no shortcuts, but Allen Browne, the "Wonder from Down Under," has an excellent tutorial on the subject here:

    How to create an audit log to record the history of changes to records in a Microsoft Access database - edits, inserts, and deletions.


    Welcome to TheScripts!

    Linq ;0)>

    Comment

    Working...