Procedure at Access Stutdown

J

Jim Evans

Is there a way to assure that a certain procedure is called before Access is
allowed to Quit? I know that there are things you can do such as removing
the Exit option from the File menu and requiring the use of a Logoff form
but, what about the user that just clicks the Close button in the
Application Control Box?
 
S

Stuart McCall

Jim Evans said:
Is there a way to assure that a certain procedure is called before Access
is allowed to Quit? I know that there are things you can do such as
removing the Exit option from the File menu and requiring the use of a
Logoff form but, what about the user that just clicks the Close button in
the Application Control Box?

Call your procedure in the close event of a loaded form (hidden or
otherwise). Access will run the code before unloading the form, then close.
 
C

ChrisO

Actually, there isn’t.
If you want to ensure a procedure runs then look into running the procedure
at startup.
 
C

ChrisO

Loss of electrons.
Thermal shutdown.
Application software crash.
Access crash.
Hardisk failure.
CPU failure.
Memory failure.
Network failure.

Each can prevent ensuring code runs.
It’s to do with the definition of ensuring.

If we can do it at startup most, but not all, of the above are ensured.
 
J

Jim Evans

Thanks for your input, Chris.
ChrisO said:
Loss of electrons.
Thermal shutdown.
Application software crash.
Access crash.
Hardisk failure.
CPU failure.
Memory failure.
Network failure.

Each can prevent ensuring code runs.
It's to do with the definition of ensuring.

If we can do it at startup most, but not all, of the above are ensured.
 
J

Jim Evans

Thanks for your input, Stuart.
Stuart McCall said:
Call your procedure in the close event of a loaded form (hidden or
otherwise). Access will run the code before unloading the form, then
close.
 

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