Fix Access Compact and Repair 'File Already in Use' Error on Windows 11
Question details
Users are unable to use the Compact and Repair feature in Microsoft Access on Windows 11 internal drives due to a locking error.

- Product
- Microsoft Access
- Device & OS
- Windows 11
- Scenario
- Trying to compact and repair a database stored on a local C: or D: drive after upgrading to Windows 11.
- Observed behavior
- Access reports that the file is already in use and fails to complete the compact and repair process, though it works normally on external drives.
Ensure you have safely copied your Access database file (.accdb) to an external drive or cloud storage as a backup before making any changes.
Clear Background Processes and Delete Lock Files
Manually close hidden background instances of Access and clear leftover lock files to ensure the database is completely released.
When Access crashes or closes improperly, it may leave a background process running or fail to delete the associated lock file (.laccdb). This makes the system believe the database is still open.
Press Ctrl + Shift + Esc on your keyboard to launch the Windows Task Manager.
Navigate to the 'Details' or 'Processes' tab, locate 'MSACCESS.EXE', right-click it, and select 'End task'.
Open File Explorer and navigate to the internal drive folder (C: or D:) where your Access database is saved.
Look for a file with the same name as your database but with a '.laccdb' extension. Right-click and delete this file, then try running Compact and Repair again.

Configure Antivirus Exclusions
Prevent antivirus software, specifically McAfee, from improperly locking your database files during scans.
Update Trusted Locations and Office Build
Ensure Access fully trusts the directory where the database is stored and manage Office updates.
Switch to a More Reliable Office Suite for Everyday Tasks
While Microsoft Access is highly specialized for databases, most of your daily productivity requires robust word processing, spreadsheets, and presentations. WPS Office is a highly compatible, lightweight, and free alternative to Microsoft Office that prevents system slowdowns and complex update errors.
- 1. Download the Suite: Visit the official WPS Office website and download the free installation package for your Windows PC.
- 2. Install and Open: Follow the simple installation prompt. Once installed, double-click any Word, Excel, or PowerPoint document to open it seamlessly.

Frequently Asked Questions
Why does Access say my database is already in use?
This error generally occurs because a background instance of Access (MSACCESS.EXE) is still running, an orphaned '.laccdb' lock file wasn't deleted properly after a crash, or an antivirus program like McAfee is scanning and locking the file.
What is an .laccdb file in Microsoft Access?
An .laccdb file is a record-locking information file created automatically when you open an Access database. It manages concurrent user edits and prevents data conflicts. It should automatically disappear when the database is closed.
Can I compact and repair an Access database from a USB drive?
Yes. Copying the database to an external USB drive often bypasses local internal drive permissions or specific antivirus locking behaviors, allowing the Compact and Repair process to run successfully as a temporary workaround.
How do I roll back a recent Microsoft Office update?
You can roll back Office updates by using the Microsoft Office Deployment Tool or by executing specific command-line prompts via the Windows Command Prompt to revert your software to a previously known stable build.




