I have the following three events in my project. Earlier today, I was seeing results from some of these.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim Result As VbMsgBoxResult
Debug.Print Me.Name & " firing BeforeUpdate and Me.Dirty = " & Me.Dirty
Result = MsgBox("OK saves, Cancel aborts.", vbOKCancel + vbCritical, "Continue?")
If Result = vbCancel Then Cancel = True
End Sub
Code:
Private Sub Form_Dirty(Cancel As Integer)
Debug.Print Me.Name & " firing Form_Dirty and Me.Dirty = " & Me.Dirty
End Sub
Code:
Private Sub Tab_Description_Click()
Debug.Print Me.Name & " firing Tab_Description_Click and Me.Dirty = " & Me.Dirty
End Sub
The middle one proved to me that the Dirty Event worked, but when executed, had not set the dirty property.
The top one confirmed that I could get in front of an update, even when it was triggered because a tab with a subform was activated and demonstrates how to cancel an update in code.
The last one was added to see where in this sequence would the tab click occur.
Since adding the tab click event, my events have become non-events - they are not firing.
WTF?