Canceling Form Close

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top