Stop closing Access windows via Taskbar

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

Guest

How do I stop users closing form windows by right clicking on the icon on the
taskbar and selecting close?
 
Adam it might help to know why you don't want users to close Access through
the normal means.

If there is something you need to do when Access closes, you could keep a
hidden form open, and use its Unload event to simulate an Application Close
event. You can do anything you need to in that event, and work cooporatively
with Windows instead of trying to lock people out.

If you don't work with the normal Windows interface, your users will just
hit the power button and shut down anyway, corrupting your database in the
process.
 
I have a login form where users select their name and then the call forms
where they call the customers from. Everytime they open the form/go to a new
record a field 'RecordInUse' is set to 'Yes'. If they use the taskbar to
close the program the record will not be set to 'No'.

I have buttons on my forms to close and exit.
 
Could you use the Unload event of your form to set the last RecordInUser to
No?

That would seem to be the natural way to use the form's events.
 
Cool, i'll use that, but it would be nice to have total control over my
database, now there's two ways to exit instead of one.
 

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