Disable the "Close" button of MS Access...not the Form...

G

Guest

When running a application (form), is there a way to disable the "Close"
button of the MS Access Database (not the form).

Thanks,
Fred
 
D

Dirk Goldgar

Fred said:
When running a application (form), is there a way to disable the
"Close" button of the MS Access Database (not the form).

You can keep a hidden form open, and have code in its Cancel event that
cancels the event. That will prevent Access from closing. It's harder
to get the application's "close" button to actually go away -- I think
you can do it, but it takes a call to the Windows API.

Why do you want to do this? It breaks Windows user-interface
guidelines, and in general, it's a bad idea not to give your users a
graceful way to exit your application. If you force them to, they'll
give it the three-finger salute, and that's not likely to be a healthy
thing for your database.
 

Ask a Question

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.

Ask a Question

Top