J
Jon Lewis
I've always used something like below as standard practice in the Before
Update event of forms:
Dim Response As Integer
Response = MsgBox("Save record changes - Confirm?", vbYesNoCancel +
vbQuestion)
If Response = vbNo Then
DoCmd.RunCommand acCmdUndo
ElseIf Response = vbCancel Then
Cancel = True
End If
However whilst developing an A2K app with several layers of subforms I've
noticed that occasionally when No is chosen when changes have been made to a
nested subform record, acCmdUndo just doesn't work. Changes are saved. I
haven't yet been able to figure out exactly what sequence reproduces this
but it is definitely periodically happening. It may be when first of all
Cancel is chosen and then the Before Update is triggered again with No
chosen. Anyone noticed this before?
TIA
Update event of forms:
Dim Response As Integer
Response = MsgBox("Save record changes - Confirm?", vbYesNoCancel +
vbQuestion)
If Response = vbNo Then
DoCmd.RunCommand acCmdUndo
ElseIf Response = vbCancel Then
Cancel = True
End If
However whilst developing an A2K app with several layers of subforms I've
noticed that occasionally when No is chosen when changes have been made to a
nested subform record, acCmdUndo just doesn't work. Changes are saved. I
haven't yet been able to figure out exactly what sequence reproduces this
but it is definitely periodically happening. It may be when first of all
Cancel is chosen and then the Before Update is triggered again with No
chosen. Anyone noticed this before?
TIA