Is there a way to disable the close button on the Access application itself so the application can only be terminated using the 'quit' button I provided?
Private Sub Form_Unload(Cancel As Integer)
Cancel = True
End Sub
that won't let you close it at all, short of ctrl-alt-del. You will want to have a flag in there that will let it close when you hit the delete button, like this:
Private Sub Form_Unload(Cancel As Integer)
if (canClose = false) then
Cancel = True
else
Cancel = False
end if
End Sub
then have your button make the global variable canClose true before it closes.
Why not just set the min/max buttons to disable (thru the form properties) and set the control box = no , also under the forms properties. Also under tools->startup disable the full menu and anything else you feel you need to disable (AT YOUR OWN RISK). This should prevent users from exiting your app.
That will only disable the form's close buttons. The application close button will still be available.
There is no way I have found to remove the application close button or to disable it short of the solutions provided here. Larry De Laruelle
ldelaruelle@familychildrenscenter.org
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.