SOLVED

Access doesn't close properly. A remaining background process can only be terminated in task manager

Copper Contributor

Since yesterday I noticed that in all my Access databases there is a problem when I close them.

When I close a database, it leaves a background process that can only be terminated in Task Manager. Without this, it is not possible to (re)open databases!

I have already checked some possible causes. It also concerns databases that I have not changed at all in recent months and that worked fine until this week. Therefore, I have to assume that it is a bug in an automatic update!

It seems that it has to do with a malfunction in the deallocation of allocated memory in VBA source code.

Did anyone experience the same problem? Are there already fixes or solutions available?

161 Replies
I just applied Version 2201 (Build 14827.20198) and everything is working normally as it was in .20192. The .accdb file functionality is working perfectly and all databases open and close as normal.
One hopes that that would mean the fix is effective and there is another aspect to the current reported problem.
Yes i have the latest update. Im now on Version 2201 (Build 14827.20192) and issue is still happening.
I think I found the culprit. I turned off Grammarly from the system tray and now MsAccess no longer get stuck as a background process. When I turn Grammarly back on the problem immediately returns. What's interesting is that Grammarly does not activate when I use MsAccess. (Apparently its still listening). I tried turning off Grammarly for all my Office Apps but no effect on MsAccess. This seems like a serious security issue. I hope MS locks this down fast.
Microsoft has not been able to replicate the problem, unfortunately, with or without Grammarly running. If the problem returns, please follow up so we can provide additional input.
By the way, not to be unsympathetic, but Grammarly is not a Microsoft product, so fixing the problem is probably in the court of Grammarly more so than on Microsoft.
I donnt reallly neeed grammmarllie aniway. Im justt glad i have a viabul worc around!!! Kind of scary that MSAccess is so fragile that it can be breached by a 3rd party app like Grammarly.
FWIW: the feedback I'm getting from the MVP group would suggest that this is more likely to be a problem in the time (and time delays) involved in starting and shutting down accdbs, especially if the accdb has "Compact on Close" set to on. It's not a breach, in that sense, if by breach the implication is that somehow the third-party software is actually intruding into the running code.
Thanks for passing that info along. I did actually try turning the compact on close on/off. No effect. I'm good for now. I've been using Access for 20 years and am used to dealing with all these types of issues. In this case, since uninstalling Grammarly I've had no issues.
I am having the problem again as of 27 Feb 2022. Access ghost process stays active after an .accdb file is closed. Subsequent to that the same file and many others will not open. I do have one very simple file with one table, one form and two modules that will sometimes open again in this situation. Other apps use an Autoexec macro and this one specifies a startup form instead.
On 27 Feb I was running 2112 (Build 14729.20322). Today, 1 Mar, I am running 2202 (Build 14931.20120). I tried a "Quick Repair" with no results and then a full Uninstall/Reinstall with no results. The problem persists. Am going to try the "Online Repair" option. The lock files are deleted when an app is closed, but the ghost process remains. Multiple open attempts will yield multiple ghost processes.
Hi Steve
I have just updated to 2202 but am not experiencing the same issues as you ... at least not yet!
I hate that now we are all almost expecting MS to break Access again! Since they already broke it twice within the past 2 months I sure hope it doesn't happen again. At least they will hear from ALL of us if it happens again. grrrrr

I am running Access 

RayW1966_0-1660611366451.png

I have the same dilemma, but my Exit button (on my form) works fine and Access closes totally.  The issue I have is if I close the database using the X (Close) button in the upper right side of the form it will keep the Access process open in Task Manager.  I've taken the extra step to not even include the X (Close) button on my forms.  This seems a little counter intuitive because most application have the X (Close) button.  I can still right click the area above the menu and select Close, but this also leaves the Access process in Task Manager.  I haven't tried any of the workarounds yet because I have a feeling, since I'm using the Beta version, that I will have to perform the workaround every time Office updates.  Any other thoughts?

 

@RayW1966 You mean when you close the Access app using the X in the upper corner it doesn't close Access? Or the close form X that I circled below?

coskerk_0-1660613768148.png

 

@coskerk I should explain more.  And thinking about it now, I think I might have a reason for my dilemma.  I run a module that when the form opens it hides the access window.  I think what I'm experiencing is when I close the form, with the X, remember, no access window, not even in the taskbar, I have no way, and the form has no way, of closing Access.  Hope that is clear.  I will have to write some code so if the form gets closed with the X, it closes Access.

@RayW1966 I have no idea what was meant by "Beta version" but that aside, I would simply open Access (no database) and close it. Is Access still running in the background? Probably not; and that would indicate that yes, something in the specific database is the cause of the issue. Take a look at using Application.Quit and attaching it to your close button.

Yes, you can use Application.Quit to close the Access application itself.
"Established" meaning some people love to repeat it. "Unofficial" meaning other people made it up to justify their own agenda against Access.

I think there IS some truth to the proposition that Microsoft would rather make more money than less money (...more profitiable...), if possible. But then, that's true of about 99% of businesses in the world. Those that would prefer to be less profitable have other motives.
When you hide the application itself, you need to make sure you can recover without resort to the task manager. Suggest you do ONE of the following
1. Remove the close button on the form or hide the entire control box including the close button
2. Add code to the form On Close event to close the app i.e. Application.Quit
3. Restore the taskbar icon so you have a method of recovery
As you suggested, I added Application.Quit in the On Close event. The issue only happened intermittently, so we'll wait to see the results.

Thank you.