In the event that you're trying to stop accidental shutdown of the
application, have a form that's always open (it needn't be visible). In that
form's Unload event, put:
If MsgBox("Are you sure you want to close the Application?",vbYesNo) <>
vbYes then
Cancel = True
End If
How do you make a form invisible when you open the application? I have a
form that opens as startup and I want to prevent users to accidently click
the application with the red (X). I have a button on the startup form to ask
user if they want to exit application. thanks.
You can either have it call a function, and have the function use the
DoCmd.OpenForm method (setting the window mode to acHidden), or you can have
the AutoExec function open your form (again, setting the window mode to
Hidden).
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.