Canceling Form Close

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a form that displays a MSGBOX if a box is not checked. When the user
selects OK I would like to be able to return to the form rather than the
form closing.
My current code is as follows:

Private Sub Form_Close()
If Me.SignedDisclosureAuthorization = False Then
MsgBox "You must check the Signed Disclosure Box", vbOKOnly
Else
DoCmd.CancelEvent
End If
End Sub

Any Suggestions to what I am doing wrong.

Thanks in advance
 
Back
Top