I want to make sure that users of a form need to perform an action first before changing on some selected fields on the form. My thought is to fire up a message when either of those fields has changed. I can not use the OnDirty event on those fields since I only want the message to appear once when either of those fields have changed. Ideally, the event should setfocus back on the field which has been changed and the user can undo the change.
I tried to write the following codes under the Form Current event but it gives me a type mismatch error.
Dim blnChkChange As Boolean
blnChkChange = False
If Me.fieldA.OnDirty = True Or Me.fieldB.OnDirty = True Or Me.fieldC.OnDirty = True Then
If blnChkChange = False Then
Msgbox "alert"
blnChkChange = True
End If
End If
Wonder if anyone can enlighten me on this.
Thanks
I tried to write the following codes under the Form Current event but it gives me a type mismatch error.
Dim blnChkChange As Boolean
blnChkChange = False
If Me.fieldA.OnDirty = True Or Me.fieldB.OnDirty = True Or Me.fieldC.OnDirty = True Then
If blnChkChange = False Then
Msgbox "alert"
blnChkChange = True
End If
End If
Wonder if anyone can enlighten me on this.