Disable quit X button or run vba on quit X button

  • Thread starter Thread starter Marcus.Schwarz \(removethis\)
  • Start date Start date
M

Marcus.Schwarz \(removethis\)

Is there a way to disable the X in the top right hand
corner of Access (the close Access X button) ? Or, is
there a way that on quit (using the X) a VB script can run?
What I'm trying to do is make a database copy itself to
another location every time it is closed. So it makes a
backup each time you close it.
I can do it if the user uses the quit button, but I can't
stop them using the X button. Is this possible you think?
 
Yes.
Just set some code in one of the forms that prevents the form closing
Form Unload event... cancel = true.
You will never be able shut down Access without resorting to the kill
switch

I kleave it as an exercise for you to control this behaviour so that
it shuts down when and how you want it to

HTH
 
Back
Top