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.