Fix Access Database File Already in Use Error During Compact and Repair
Question details
The user encounters an 'already in use' error when attempting to run the Compact and Repair tool on Microsoft Access databases, even after reinstalling the software.

- Product
- Microsoft Access
- Device & OS
- Windows
- Scenario
- Running Compact and Repair on local, OneDrive, or newly created ACCDB database files.
- Observed behavior
- Access blocks the operation and displays a prompt stating the database file is already in use, preventing the repair process from completing.
Ensure that you have completely closed all active Microsoft Access windows and verify that no other users on your local network are currently connected to the database file.
Clear Leftover Lock Files and End Background Processes
Background Access processes or residual lock files can trick the system into believing the database is actively open.
When you open an Access database, a temporary locking file (.laccdb) is generated. If Access crashes or closes improperly, this file may remain in the directory and lock the database.
Press Ctrl + Shift + Esc to open Task Manager. Look for any running instances of 'Microsoft Access' or 'MSACCESS.EXE', right-click them, and select 'End task'.
Open Windows File Explorer and navigate to the directory where your ACCDB file is saved.
Look for a file with the exact same name as your database but with a '.laccdb' or '.ldb' extension. Right-click this file and select 'Delete'.
Reopen Microsoft Access, go to 'Database Tools' in the top ribbon, and click 'Compact and Repair Database'.

Verify Local Folder Permissions and Pause Cloud Sync
Strict local permissions or active OneDrive syncing can temporarily lock database files and prevent modifications.
Test with a New Windows User Profile
If the issue happens with all newly created databases, your current Windows user profile or registry settings might be corrupted.
Looking for a Lightweight and Reliable Office Suite?
If you are tired of dealing with complex Microsoft Office lock-file errors and expensive subscriptions, WPS Office is an exceptional free alternative. While it doesn't include a direct relational database tool like Access, it serves as a lightweight, lightning-fast replacement for Word, Excel, and PowerPoint, delivering a familiar interface and seamless document migration.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the setup file and follow the straightforward on-screen instructions to install the suite.
- 3. Open and Edit Files: Double-click your existing Office documents to open them instantly in WPS Office, with all formatting preserved.

Frequently Asked Questions
Why does Microsoft Access create a .laccdb file?
Microsoft Access creates a record-locking file (.laccdb) whenever a database is opened. This file actively tracks which users are currently accessing the database to prevent conflicting data entries and corruption.
Can cloud sync services like OneDrive cause Access databases to lock?
Yes. If OneDrive is actively syncing the ACCDB file to the cloud while you are trying to use the Compact and Repair tool, Access may interpret the sync process as another active user, triggering the 'already in use' error.
What is the purpose of the Compact and Repair tool?
The Compact and Repair tool reclaims unused hard drive space from deleted records and attempts to fix corrupted data structures within the file. Running it regularly helps optimize database performance and prevent fatal errors.
How do I force-close Access if it's running in the background?
You can force-close hidden Access processes by opening the Windows Task Manager (Ctrl + Shift + Esc), locating 'MSACCESS.EXE' under the Processes or Details tab, right-clicking it, and selecting 'End task'.




