1

When using the object currentproject in msaccess, and exiting the application with quit, I cannot get rid of ghost files/background_processes of Access in the task manager. How do I fix this?

Just a form with two buttons with the code show the difference. :

Button Exit: no background process is created

Private Sub Exit_Click()  
    Application.Quit  
End Sub  

Button MakeGhostService: a ghost Process is created every time I quit.

Private Sub MakeGhostProcess_Click()  
    Dim nilvar As String  
    nilvar = CurrentProject.Name  
    Application.Quit  
End Sub  

In both cases, Access disappears from the Apps section in the Task Manager and then appears a new background process of Access. For the case where Exit is clicked, the background process disappears 1 or 2 seconds later. For the other button it remains.

if I open again Access, run the form, and press makeGhostProcess, again exits Access leaving a new instance of access as a Background Process and I can get as many instances at the same time as I run the form and press the damn button.

Andre
  • 26,751
  • 7
  • 36
  • 80
  • Very odd. I can't reproduce this with Access 2010. Please add the tag for the version you are using (and perhaps the exact version/build in the question). – Andre Jan 30 '22 at 17:22
  • I cannot reproduce either. Also using Access 2010. – June7 Jan 30 '22 at 19:41
  • I am using Access 365. I mean Background Processes , not services. – Francisco Testor Jan 30 '22 at 21:54
  • Microsoft 365 MSO (versión 2201 compilación 16.0.14827.20158) de 64 bits – Francisco Testor Jan 30 '22 at 22:05
  • CHECK THE FILE: https://wetransfer.com/downloads/1ef4d4e6c2d4826a75bdddb4cd4ecf7020220130221057/86f00ae689255245c22f18dac0feb82520220130221117/34eb05 – Francisco Testor Jan 30 '22 at 22:12
  • Some things to try. Run a full [Decompile](https://stackoverflow.com/a/3268188/3820271). Check if the same happens if you insert that code into a new database that you started from scratch and doesn't have any additional references. Do an Office Repair. – Andre Jan 31 '22 at 00:38
  • I will decompile and try to repair. But I think it could be an Access bug. I run the DB in two different computers (two different Access installs) and same problem. The DB contains just form w two buttons that I built to reproduce the behavior I was getting in a large application I am working on. Can u download and test the file of the link I posted and tell me if you get also the strange behavior? Maybe the problem is w the references.I will check – Francisco Testor Jan 31 '22 at 03:51
  • Done. No ghosts. The button with `X` does nothing, there is no code associated. – June7 Jan 31 '22 at 08:13
  • I tested the code in Office 365 version 2112, 32bit. No issues, MSACCESS.EXE always ends like it should. Is this new code of yours, or did it work before and the problem is new? – Andre Jan 31 '22 at 11:04
  • Regarding the buttons, one exits the application, the other just assigns to a variable the name of currentproj, and there was where the black magic made its appearance. just by invoking the currentproject object, Access left unclosed background processes running. Thanks for posting your comment – Francisco Testor Jan 31 '22 at 13:21
  • Hi. My problem persists. I have researched a bit but found no solution. The problem seems to be that when I create a variable, any type, and quit the program, there is a memory leak and a background process is left running. The problem is not directly bound to currentproject or anything similar. If I just declare the variable with a DIM statement and quit. WTH is going on? any clue? – Francisco Testor Jan 31 '22 at 22:33
  • 1
    Checked again. The problem happens with Access 365 v. 2201 and does not with the 2112. Anybody can test with 2201 if processes in the background appears after quitting if a DIM statement has run in a form? – Francisco Testor Feb 01 '22 at 22:02

3 Answers3

0

I've got the same problem as you and I found your post. I have tried your file Database10 with my access version (2210) and the processes in the background appears. I think it's a bug of the 2201 version of access. This problem did not exist before.

ouflak
  • 2,458
  • 10
  • 44
  • 49
Thomas
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 04 '22 at 10:38
0

I just found this post by Karl Donaubauer:


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


Karl Donaubauer replied to Florian1290

‎Feb 02 2022 02:39 AM - edited ‎Feb 02 2022 02:44 AM

You are not alone. There are reports about it in all Access forums of the world. I answered it like this several times:

According to many posts in the last days M365 Current Channel version 2201 build 16.0.14827.20158 of Jan 26 causes

  • a persistent .laccdb, an Access ghost process
  • error 3048 cant open any more databases
  • other errors like "already in use by Admin"

The only remedy so far is to revert back to an older build of M365. See also the M365 version history.

I've reported it to Microsoft, too.

Servus Karl

Andre
  • 26,751
  • 7
  • 36
  • 80
0

Same problems (Access 2021: 2201 build 16.0.14827.20158):

According to many posts in the last days M365 Current Channel version 2201 build 16.0.14827.20158 of Jan 26 causes 16.0.14827.20158 of Jan 26 causes

a persistent .laccdb, an Access ghost process error 3048 cant open any more databases other errors like "already in use by Admin"

additional error: 3035 today so i try to go back to an erlier version (2112 14729.20260) 12 january