Logging changes made in a form

albrad84

New member
Local time
Yesterday, 19:27
Joined
May 18, 2005
Messages
8
I was wondering if there is a simple way to check if any changes have been made to a record when the form is closed because I would like to create a log of records that were changed. I'm sure I could create some variables to store the fields when the form is opened then check if they're still the same when the form closes, but I figured there's probably already a built-in way of doing this (since the undo button must obviously use it)

Thanks,

Adam
 
Adam,

The On Dirty event is triggered whenever anything in any field on a form (AFAIK) is changed, you could use it to set any flags as necessary. There is also the On Change event for each field, which will enable you to determine the field that has changed and which is triggered for each keypress, i.e: enter five characeters and On Change will be triggered five times, if you need to be that precise.

Tim
 
You can use the OldValue property to retrieve the previous value after if was changed for the current record.

Code:
Me.TextboxName.OldValue
Sounds like you need to incorporate an Audit Trail into your db. Check out the sample I have posted @ Audit Trail.
 

Users who are viewing this thread

Back
Top Bottom