Riddle me this:
I open a bound form, single table query, with ONE label whose caption is set on load event. The form is opened via a click event on a datasheet, filtered to the ID of the clicked record.
The first text box gets the focus, also on load event.
Without changing anything at all: Dirty on Load: false; dirty on before update: true.
close button: close form, set not to save.
I have a message box that pops up to confirm changes and it fires every time I close the form.
Edit: I forgot to mention that the dirty event does not fire.
The form calling code:
Before update:
From the Immediate window:
Dirty Load: False
Dirty Before Update: True
Dirty Close: False
Thoughts on how I could track this down?
thanks,
mike
I open a bound form, single table query, with ONE label whose caption is set on load event. The form is opened via a click event on a datasheet, filtered to the ID of the clicked record.
The first text box gets the focus, also on load event.
Without changing anything at all: Dirty on Load: false; dirty on before update: true.
close button: close form, set not to save.
I have a message box that pops up to confirm changes and it fires every time I close the form.
Edit: I forgot to mention that the dirty event does not fire.
The form calling code:
Code:
DoCmd.OpenForm "GEN_F_L1_SupplierDetail", acNormal, , "[ID] = " & Me.txtID, acFormReadOnly, acWindowNormal
Before update:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Debug.Print "Dirty Before Update: " & Me.Dirty
If Me.Dirty Then
If MsgBox("Confirm Changes?", vbQuestion + vbOKCancel, "Data Has Changed.") = vbCancel Then
Me.Undo
Else
End If
End If
End Sub
From the Immediate window:
Dirty Load: False
Dirty Before Update: True
Dirty Close: False
Thoughts on how I could track this down?
thanks,
mike
Last edited: