Disable close button in access 2007 (1 Viewer)

genesis

Registered User.
Local time
Yesterday, 17:30
Joined
Jun 11, 2009
Messages
205
I would like to quote and post this here:

Disabling the application close button in Access 2003, 2002, 2000 and 97 can be done by codes that are available by research on the internet and on the forum. In this code, you can actually see that the button has been removed from the application window.

There is also a code that can disable the function of the close button in Access 2007 but not as same as the previous versions. In this code, though the function is disabled, but you can still see the buttons there.

I was wondering maybe if there is no code to actually removed the close, max, min button in the access application window, maybe the other option would be, when you click the close button on the access application window it will prompt a messagebox saying that you need to use the proper log-off/exit button assigned for that purpose.


However, I'm still researching for that. I thought I could post this thought maybe someone may share the knowledge.
 

namliam

The Mailman - AWF VIP
Local time
Today, 01:30
Joined
Aug 11, 2003
Messages
11,696
What you do is have a hidden form that "on close" cancels the closing...

Then if you do want to close the database, you have a public variable that you change to true or "OK" or something ... Then in your on close event of the hidden form check for that variable, if OK do nothing (exit db), if not cancel it.
 

Users who are viewing this thread

Top Bottom