T
tobesurveyor via AccessMonster.com
Good Evening,
Instead of forcing a user to use a button to close out of the database I want
to allow the user to click the red - x in the right hand corner of Access
Window. To make sure the user wants to close the entire application, I have
a hidden form with the On_Close Event to be a message box prompting the user
to say "yes" if they want to exit or No to stay in the program. Even if they
click no, access still closes. Right now my Code is:
msg = "Are you Sure you want to quit the Survey Management Suites?"
prompt = vbYesNo + vbQuestion
TITLE = "Exiting Survey Management Suites..."
Response = MsgBox(msg, prompt, TITLE)
If Response = vbYes Then
If IsLoaded("frmLoginHidden") Then
DoCmd.Close acForm, "frmLoginHidden", acSaveNo
End If
Else
Exit Sub
End If
Am I missing something, what should my line of code be to cancel Access from
Closing?
Any help in this would be greatly appreciated,
Thanks,
Chris
Instead of forcing a user to use a button to close out of the database I want
to allow the user to click the red - x in the right hand corner of Access
Window. To make sure the user wants to close the entire application, I have
a hidden form with the On_Close Event to be a message box prompting the user
to say "yes" if they want to exit or No to stay in the program. Even if they
click no, access still closes. Right now my Code is:
msg = "Are you Sure you want to quit the Survey Management Suites?"
prompt = vbYesNo + vbQuestion
TITLE = "Exiting Survey Management Suites..."
Response = MsgBox(msg, prompt, TITLE)
If Response = vbYes Then
If IsLoaded("frmLoginHidden") Then
DoCmd.Close acForm, "frmLoginHidden", acSaveNo
End If
Else
Exit Sub
End If
Am I missing something, what should my line of code be to cancel Access from
Closing?
Any help in this would be greatly appreciated,
Thanks,
Chris