I have a Form that uses a BeforeUpdate event to offer the user the chance to undo changes before saving. The code below works however I do not wish the form to clear its contents once the user clicks yes as I would like the user to have the ability to then go onto add data into the subform contained within this form. Any Idea?
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Provide the user with the option to save/undo
'changes made to the record in this form
If MsgBox("Clicking YES will save these deatils!" _
& vbCrLf & vbCrLf & "Do you wish to commit these changes?", _
vbYesNo, "Do You Require These Changes Made...") = vbYes Then
DoCmd.Save
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Provide the user with the option to save/undo
'changes made to the record in this form
If MsgBox("Clicking YES will save these deatils!" _
& vbCrLf & vbCrLf & "Do you wish to commit these changes?", _
vbYesNo, "Do You Require These Changes Made...") = vbYes Then
DoCmd.Save
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub