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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top