[AccessD] MSACCESS.EXE Still Visible in Windows Task Manager after DoCmd.Quit Command

Brad Marks BradM at blackforestltd.com
Wed Jan 5 14:51:14 CST 2011


John,

Thanks for the help, I appreciate it.

In a "prior life" I spent many years in the IBM Mainframe world of
COBOL, CICS, and DB2.  I don't think that the term "garbage collection"
was ever used in this realm but I do recall overhearing "non-Cobolians"
cuss about it.  Now I am starting to appreciate what they were dealing
with.

Thanks again,
Brad   



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, January 05, 2011 2:37 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] MSACCESS.EXE Still Visible in Windows Task
Manager after DoCmd.Quit Command

 > I am curious as to why this is happening.

Are you a programmer?

My experience is that this occurs when the VBA garbage collector takes a
smoke break.  ;)

Seriously, there is this thing called a garbage collector and it is
supposed to do things like close 
ADO and DAO recordsets and release the pointers to them.  If you save
pointers to controls in 
classes, the GC is supposed to release these pointers when the class
closes.

The GC in VBA is notoriously unreliable.  AFAICT it is possible to store
a pointer to a control pn a 
form in the class for that form for example and when the form closes it
does not correctly release 
these pointers.

When this happens, Access still has objects open internally, forms close
"but not really" and so 
Access closes, "but not really".

When this happens, you have no choice but to kill the process in task
manager.

The answer is to *ALWAYS* clean up your own mess, close your own objects
that have a close method, 
then programmatically set the pointer to that object to nothing.

It is very tough to always do this, and when you forget, Access starts
to not close correctly (again).

John W. Colby
www.ColbyConsulting.com

On 1/5/2011 3:11 PM, Brad Marks wrote:
> Occasionally, we notice that an Access 2007 application is still
visible
> in the Windows Task Manager after the "DoCmd.Quit acQuitSaveNone" is
> issued.
>
> (Even after waiting 10 minutes after the DoCmd.Quit command is issued)
>
> To the user, the Access application has disappeared, but it still is
> visible in the Windows Task Manager under the Processes Tab
>
> We can, of course, kill off the application in the Windows Task
Manager,
> but we would prefer to not do this.
>
> I am curious as to why this is happening.
>
> Is there something that can be done in the Access application to
prevent
> this?
>
> Have other people seen this happen?
>
> Thanks,
> Brad
>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





More information about the AccessD mailing list