Fix Microsoft Access Process Continues Running After Closing
Question details
The user needs to stop Microsoft Access background processes from remaining active after the application is closed, which is preventing the database from being reopened.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Closing a Microsoft Access database after executing a button-click VBA procedure.
- Observed behavior
- An Access instance remains running in the background processes within Task Manager, locking the database and preventing subsequent access.
Ensure you have saved a backup copy of your Access database before modifying any VBA code, and check that you have the necessary folder permissions to delete temporary files.
Review and Clean Up VBA Object References
Ensure all database objects, query definitions, and recordsets are properly closed and released in your VBA procedures to prevent orphaned processes.
When VBA code runs, it creates objects in the computer's memory. If these objects are not explicitly closed and released when the code finishes executing, Microsoft Access may keep a background process running. Reviewing your procedures and releasing these objects is the most effective way to resolve this hang.
Open the VBA editor and find the procedure triggered by the button click, as well as any sub-functions called by the event (such as lstBoxInBoundData).
Do not use the 'qdf.Close' command for QueryDef objects. Instead, release the object from memory by typing 'Set qdf = Nothing' at the end of its use.
Ensure every opened recordset is explicitly closed with 'rs.Close' and then immediately released from memory using 'Set rs = Nothing'.
Consolidate multiple calls to 'CurrentDb' by assigning it to a database object variable (e.g., 'Set db = CurrentDb'). Release it at the end of the script using 'Set db = Nothing'.

Verify Folder Permissions for Temporary Files
Check if your Windows user account has the required permissions to delete the temporary database lock file in the directory.
Discover WPS Office - A Free, Lightweight Microsoft Office Alternative
While WPS Office does not include a direct equivalent to Microsoft Access, it is a highly compatible and free alternative for Word, Excel, and PowerPoint. Enjoy a familiar interface and seamless migration without the hefty subscription fees.
- 1. Download WPS Office: Visit the official WPS Office website and click the free download button to get the installer.
- 2. Install the Software: Run the downloaded setup file and follow the simple on-screen instructions to complete the installation.
- 3. Start Creating: Launch WPS Office to easily open, edit, and save your existing Word, Excel, and PowerPoint files.

Frequently Asked Questions
Why does Microsoft Access leave a lock file (.laccdb) behind?
A lock file remains in the folder if an instance of Access crashes, stays running as a background process due to unreleased VBA objects, or if the user lacks the necessary file deletion permissions in that specific Windows directory.
How do I manually kill a stuck Access process?
Press Ctrl + Shift + Esc to open the Windows Task Manager. Locate 'Microsoft Access' under the 'Background processes' list, right-click on it, and select 'End task' to force the application to close.
Does using CurrentDb multiple times cause background processes to hang?
While it is not always the sole cause, repeatedly calling CurrentDb without assigning it to a variable and releasing it properly can create unreferenced instances in the computer's memory, which often leads to background hangs upon closing.




