logo
search
Office Settings & Configuration

How to Fix Microsoft Access Compact and Repair or File-in-Use Errors

Maira MehtabMaira Mehtab Sep 20, 2026 869 views

Question details

The user is experiencing issues with Microsoft Access databases failing to compact and repair, remaining locked as 'in use', or failing to close completely.

Product
Microsoft Access
Device & OS
not provided
Scenario
Attempting to manage, repair, or close Access databases after a power interruption or recent Office update.
Observed behavior
Databases fail to execute the compact and repair function, files stay marked as 'in-use' locking out users, and the Access application continues running in the background even after the file is closed.
Before you start

Before proceeding, ensure you have a backup copy of your database file and verify that no other network users are currently connected to the shared database.

Solution 1Recommended

Add the Database Folder to Access Trusted Locations

Configuring Trusted Locations resolves file lock and compact/repair bugs triggered by recent Office updates by marking the database directory as safe.

Recent Microsoft Office updates introduced a known bug that prevents Access databases from properly closing, compacting, or clearing their lock files. The official workaround is to explicitly add the folder containing your database to the Trust Center's safe list.

1
Open Access Options

Launch Microsoft Access. Click on 'File' in the top-left corner, and then select 'Options' at the bottom of the left sidebar.

2
Navigate to Trust Center Settings

In the Access Options window, click on 'Trust Center' from the left pane, then click the 'Trust Center Settings...' button on the right.

3
Add a New Trusted Location

Select 'Trusted Locations' from the left menu. Click the 'Add new location...' button at the bottom.

4
Browse and Confirm the Folder

Click 'Browse' to locate the folder where your affected database is stored. Check the box that says 'Subfolders of this location are also trusted' if applicable, then click 'OK' on all dialog windows to save your changes.

Network Locations Note: If your database is hosted on a network drive, ensure you first check the 'Allow Trusted Locations on my network (not recommended)' box in the Trusted Locations menu.
Free Microsoft Office alternative

Looking for a reliable Office suite? Try WPS Office

If you are tired of troubleshooting complex software bugs or dealing with disruptive background updates, consider WPS Office for your document, spreadsheet, and presentation needs. It is a lightweight, highly compatible alternative that ensures smooth performance.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
  3. 3. Start Working: Open WPS Writer, Spreadsheet, or Presentation to immediately begin handling your documents with full Microsoft Office format compatibility.
Seamlessly open, edit, and save Microsoft Word, Excel, and PowerPoint files.Lightweight installation with fast startup times and stable performance.Free to use with an intuitive, familiar tabbed interface for seamless migration.Fewer complex configuration bugs compared to traditional heavyweight suites.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Access database say 'file in use' when it's closed?

This happens when the .laccdb or .ldb lock file is left behind after an application crash, power interruption, or background task failing to close properly. Deleting this lock file manually or configuring Trusted Locations usually resolves the issue.

Is it safe to add a network drive to Access Trusted Locations?

Yes, provided the network drive is secured and accessed only by trusted members of your organization. You must first check the 'Allow Trusted Locations on my network' box in the Trust Center Settings before you can add a network path.

Why is the Compact and Repair tool failing suddenly?

Recent Office updates introduced a known bug affecting database operations and cleanup processes. Adding the database's storage folder to the Access Trusted Locations list is the official workaround recommended by Microsoft until a permanent patch is released.