check for change to field value

D

dfeigen115

I know the "dirty" attribute can be used to see if a form's content changed.
Is there a similar attribute that I can use top evaluate whether a specific
field onthe form was changed?

Thanks,
Dan
 
A

Allen Browne

Compare its Value to its OldValue.

Like this:

With Me.[NameOfYourControlHere]
If (.Value = .OldValue) Or (IsNull(.Value) And IsNull(.OldValue))
Then
MsgBox "No change"
Else
MsgBox "Changed"
End If
End With
 
D

dfeigen115

Thank you Allen ......

Allen Browne said:
Compare its Value to its OldValue.

Like this:

With Me.[NameOfYourControlHere]
If (.Value = .OldValue) Or (IsNull(.Value) And IsNull(.OldValue))
Then
MsgBox "No change"
Else
MsgBox "Changed"
End If
End With

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

dfeigen115 said:
I know the "dirty" attribute can be used to see if a form's content
changed.
Is there a similar attribute that I can use top evaluate whether a
specific
field onthe form was changed?

Thanks,
Dan
 
Top