A
Alan
The following is the code when I pressed the Cancel button:
Private Sub cmdCancelAdd_Click()
On Error GoTo Err_cmdCancelAdd_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Exit_cmdCancelAdd_Click:
Exit Sub
Err_cmdCancelAdd_Click:
MsgBox Err.Description
Resume Exit_cmdCancelAdd_Click
End Sub
What code and where should I put in order to close the form ?
Private Sub cmdCancelAdd_Click()
On Error GoTo Err_cmdCancelAdd_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Exit_cmdCancelAdd_Click:
Exit Sub
Err_cmdCancelAdd_Click:
MsgBox Err.Description
Resume Exit_cmdCancelAdd_Click
End Sub
What code and where should I put in order to close the form ?