Feb 02 2022 01:36 AM
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?
Aug 16 2022 02:02 PM
@isladogs I added Application.Quit to the On Close event of my form but got the following error:
Note however, my form and VB editor stayed open, and my Access window closed. I had to end the task manually.
Aug 16 2022 04:16 PM
In that case, either you are
a) still using a version that was affected by the bug from earlier this year - if so, a version update will fix it
b) or you have an issue with your code. Suggest you upload a cut down version of your database with most of the data and all unrelated objects removed.
Aug 16 2022 09:24 PM
I suspect I have an issue with my code. I'm going to look at it again before uploading anything. I'll keep you posted.
Aug 29 2022 07:02 AM - edited Aug 29 2022 07:04 AM
We are experiencing this same behavior in Version 2207 now, and no possible Trusted Folder/File combination fixes it... I confirmed it has nothing to do with any code updates by opening a version from May that worked just fine previously that exhibited the same behavior of leaving a ghost process.
Aug 29 2022 10:34 AM
Hi,
@ToddP What is your Office Build No?
Did you try to revert to the previous build? (see Daniel's description or Microsoft's)
If the problem does not occur with the previous build, that would be a strong indication of an update bug.
Servus
Karl
Access News
Access DevCon
Aug 29 2022 11:05 AM
@Karl Donaubauer Just got the Office Deployment Tool setup to revert a 'few' versions to test that out so I'm working on that, was just really hoping someone else might be able to offer something better to avoid that for ALL affected computers.
Aug 29 2022 02:43 PM
Aug 29 2022 02:58 PM
Aug 30 2022 08:15 AM
Sep 05 2022 07:56 PM
Sep 06 2022 03:23 AM
Sep 06 2022 03:58 AM
Sep 06 2022 06:55 AM
Oct 13 2022 03:28 AM
Dec 15 2022 05:05 PM
The problem: Access closes normally but will not reopen giving an error message saying something about you do not have permission..."
NiteOwl's Solution solution fixed the problem for me on 2022-12-15.
The solution is here:
https://techcommunity.microsoft.com/t5/access/access-doesn-t-close-properly-a-remaining-background-p...
Here is the post to look for:
NiteOwl replied to NiteOwl:
------------------------------
Feb 03 2022 10:34 AM
You can also somewhat automate it by creating a .reg script or using group policy. The settings you need are:
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Access\Security\Trusted Locations\DBLocation]
"Path"="C:\\DBFolder\\"
"AllowSubfolders"=dword:00000001
"Description"="Local DB Folder"
"Date"="2/2/2022 7:44 PM"
Prior to this patch, files in the Users\username\AppData folder were allowed but now they are being treated differently. It may be true for other locations as well.
------------------
The post be NiteOwl would not run as a .reg file. But it works: I opened regedit and manually created the key DBLocation at the end of the path cirted by NiteOwl. Then I manually created the sub keys and set the values he listed being careful to set the datatype of each value to match those observed in existing keys created in Trusted Locations.
Jun 24 2023 02:36 AM
Jun 24 2023 07:06 AM
@JEEDEE23 What I finally did was to add
Private Sub Form_Close()
DoCmd.Quit acPrompt
End Sub
in my form On Close. It worked. Something so simple that I didn't even think of it when I was having the issue myself. Hope this helps anyone having a similar issue.
Jun 24 2023 08:47 AM
Jun 25 2023 01:09 AM
For me, I tracked the issue down to Grammarly running in the system tray. If that was closed, I no longer received the behaviour. So if you use Grammarly, give that a try. It could be that or a similar add-in.