Close button on ACCESS window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I disable the close button on the ACCESS window to stop users of my
application from closing the application without using the relevant form to
ensure that all the necessary close down prodcedures are run correctly.

Anyone have any ideas.
 
As a work around for this, when you open your database, open a hidden form.
In the Unload event of that form you can Cancel the unload if predetermined
conditions haven't been met. Access will try to close this form before
closing itself. When you cancel the unload, you prevent Access from closing.

For the predetermined condition, create a global variable that you will set
the value of in your close routine. Check the value of this variable in the
Unload event mentioned above and if it's not correct, cancel the unload and
popup a message informing the user of the problem.
 

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

Back
Top