How can I temporarily prevent the user from being able to close Access (disallowing them to click on the X or choosing the Exit option from the File menu)?
James
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Preventing CLosure (Access 2000 SR1)
http://www.mvps.org/access/general/gen0005.htm%5B/url%5D
Edited by Charlotte to activate link
Thanks for the link.
It seems like I am not making myself totally clear and this only does half the job.
It is true that this prevents Access from closing and that is what I am looking for.
But if I have any other forms that are open, Access would attempt to close them and I want to prevent that as well.
In essense, I want to be able to disable the X button for Access totally so that the option is not even there. I have now implemented the suggestions made here and it only properly works if the Main form is the only one open. If I have any other forms open, the program does not allow any selection of anything giving the impression of the program hanging as I have code which only allows the form to close if I click on a certain command button.
Any suggestions here?
James
Thanks is works!
But now it causes another problem…..
If I get this form to open another form (and all of my forms are modal to help prevent the users from causing problems) and I try and close Access by clicking on the X, I do not get any response from the program if I click on one of the radio buttons or check boxes or combo box or command button.
I am able to navigate through the Access Menu items, but none of the menu will actually run.
Any ideas?
James
At first glance over the code – very impressive! Expecially for the amount of code there is..
It take myself and the 2 other guys in the department I’m in some time to figure this all out and sketch out your design.
Just wondering, do you have your design for this layed out in a document or on paper somewhere.
And would I be allowed to implement your design in the program that I am writing? (I am working for a non-profit organisation at the moment).
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications