
Quitting Application won't close Access 7.0
Hi Liz,
It seems that Access stands alone even after an Application.Quit when at
many conditions are present: eliminating one of these conditions and Access
will shut down.
The easiest condition in your control is to set any global reference of
object to Nothing. As example, if you have globaly defined
Pblic Db As Database
then, before exiting, you must also write:
Set Db = Nothing
So, check carefully all your global declarations and if one contain an
object ( anything that must be "Set"), assign it to Nothing before closing.
(That condition alone is not enough to REPRODUCE the Access behavior you
have observed, as demonstrated by this code in a module:
Public Db As Database
Public Sub CloseAccess()
Set Db=CurrentDb()
Application.Quit
End Sub
Running CloseAccess will effectively close Access, even if Db is not set to
nothing, ... just to show that other conditions have to been met to
reproduce the behavior...)
Hope it may help,
Vanderghast, Access MV^P.
Quote:
>I have a database ready for distribution except for the one extremely
>annoying fact that on quitting the application Access stays in the task
>bar. I have checked that all recordsets and databases have been closed but
>still no luck. Can any one help, I'm getting desperate for a solution.
>Liz