Checking all fields on a form for change

trickg

Registered User.
Local time
Today, 10:41
Joined
Jan 30, 2002
Messages
28
I need to check all fields on a form, which is a considerable number, and update another field if any of the data in the record gets changed. I don't want to use the change event of each field on the form (Form has a tab control with 5 tabs, all full of fields) so basically if someone checks a box, adds text, deletes text, whatever, I want to make my "CHANGED" field (yes/no) = "Yes"

Is there an event or property associated with the form that will track that for me or do I actually have to use the "Changed" event on every single field?

Any help will be greatly appreciated.
 
If you want to do this when you close the form then on the OnClose event for the form put the following:

If Me.Dirty Then
<<the actions you want to carry out>>
End If

Me refers to the form and is just shorthand rather then specifying [Forms]![name_of_Form].

Me.Dirty simply means that if any changes have occured in the form then carry out the actions in the If statement
 

Users who are viewing this thread

Back
Top Bottom