D
Danny
I have a 3 forms, a main form, a subform to the main form and a
subform related (I believe referred to as nested or sub sub form) to
that subform. Gosh I hope this makes sense.
(form 1 is main form 2 is subform of 1 and form 3 is a subform of 2)
I have put the following code on the before update properties event in
the main form and also tried to put this in the sub form and the sub
sub form.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Data Has Changed - Do You Want to Update this Record", _
vbQuestion + vbYesNo) = vbNo Then
MsgBox "Record Not Updated"
Cancel = True
Me.Undo
End If
Exit_Add_or_Update_Click:
Exit Sub
Err_Add_or_Update_Click:
MsgBox Err.Description
Resume Exit_Add_or_Update_Click
End Sub
What I would like this to do is if the user updates any data in any of
the forms/subforms then ask the question one time, versus 3 times per
each form/subforms.
Does anyone have any ideas? or if you need more information please
advise
Thanks
subform related (I believe referred to as nested or sub sub form) to
that subform. Gosh I hope this makes sense.
(form 1 is main form 2 is subform of 1 and form 3 is a subform of 2)
I have put the following code on the before update properties event in
the main form and also tried to put this in the sub form and the sub
sub form.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Data Has Changed - Do You Want to Update this Record", _
vbQuestion + vbYesNo) = vbNo Then
MsgBox "Record Not Updated"
Cancel = True
Me.Undo
End If
Exit_Add_or_Update_Click:
Exit Sub
Err_Add_or_Update_Click:
MsgBox Err.Description
Resume Exit_Add_or_Update_Click
End Sub
What I would like this to do is if the user updates any data in any of
the forms/subforms then ask the question one time, versus 3 times per
each form/subforms.
Does anyone have any ideas? or if you need more information please
advise
Thanks