Microsoft Access Could Not Lock File
Microsoft Access displays “Could not lock file” when it cannot establish the file access needed to open a database. Start by checking permissions on the folder containing the database, then check for exclusive access and disconnected sessions. Shared databases normally support several users; this message.
Which licences fit your PC setup?
Prices are an AUD snapshot, not a live quote. Confirm variant and total on the listing.
-

Office 2021 Pro Plus key
$57.00 AUD
-

Office 2019 Pro Plus key
$45.00 AUD
-

Microsoft 365 Pro Plus, 5 devices
$15.00 AUD
$29.00
What the Access lock file does
When a database opens for shared use, Access creates a companion lock file in the same folder. An .accdb database uses a .laccdb file; an .mdb database uses a .ldb file. For example, Accounts.accdb has a companion named Accounts.laccdb.
The lock file helps coordinate editing between users. Its presence while people are working is normal. Access usually removes it after the last user closes the database, but it can remain if deletion permissions are missing or the database is marked as corrupted. Microsoft explains this behaviour in its description of Access lock files.
A message about a particular record being locked is a different problem: another person may be editing that record. “Could not lock file” calls for checking access to the database and its folder first.
Use the symptoms to choose your first check
| What happens | What to check first |
|---|---|
| One person cannot open the database, but colleagues can. | That person’s folder permissions, network credentials and computer. |
| The first user can open it, but another cannot. | Exclusive opening and permission to create or update the lock file. |
| Everyone loses access after a network interruption. | The shared folder connection and remaining server sessions. |
| The error appears during backup or maintenance. | Whether the task needs exclusive access or another process holds the file. |
These patterns help narrow the investigation; none proves the cause by itself. Record the exact error and database path before changing anything.
Work through the fixes in order
-
Check permissions on the containing folder
Being able to read the database is insufficient for shared access. Users need the folder permissions required to read, write and create the lock file, with deletion rights so it can be removed afterwards. On a network share, ask your administrator to check both share permissions and the underlying file-system permissions for the affected account.
As a practical check, use that account to create a temporary text file in the database folder, save a change and delete it. Failure points to a folder-access problem. Success does not rule out restrictions on the database or an existing lock file. Also check whether the database file itself has its Read-only attribute set.
For a split database, check the folder containing the back-end data file as well as the local front-end folder. Microsoft’s guidance on opening a database on a server explains why folder creation rights matter.
-
Check that users are opening in shared mode
Ask whether anyone selected Open Exclusive or started a maintenance task. Arrange for that person to finish and close the database before retrying.
To check the usual opening mode, select File > Options > Client Settings. Under Advanced, set Default open mode to Shared, then close and reopen Access. Also check shortcuts or automated launch procedures that may explicitly request exclusive access. Microsoft documents this setup in its database sharing guidance.
-
Close remaining sessions before handling a lock file
Ask everyone to save their work and close the database. Include applications or scheduled jobs that connect to it. If Access appears closed but the server still shows an open connection, have IT identify the computer or process responsible.
Do not delete a lock file while anyone is using the database. If it remains after all connections are confirmed closed, an administrator can investigate its permissions and whether it can safely be removed. Never delete the .accdb or .mdb database itself. A remaining lock file alone does not prove that a user is still connected.
-
Check the network location
Open the database’s shared folder in File Explorer using the affected account. Confirm that the expected server and folder are available. Note any repeated disconnections or requests for credentials and pass them to IT.
If a comparison is needed, close the database and make an authorised test copy in a writable local folder. A copy that opens locally helps direct attention to the shared location. Keep it separate from live work so users do not enter data into competing copies.
-
Investigate backup or security software when there is evidence
If failures coincide with a backup job, scan or security alert, ask IT to review the relevant logs and file handles. Reschedule conflicting maintenance or make a targeted configuration change when the cause is established. Avoid treating broad antivirus exclusions as a routine fix for every locking error.
-
Use Compact and Repair only after access checks
The locking message alone does not establish corruption. If permissions and sessions are correct but the database still fails, preserve a backup before attempting repair. Everyone must be out of the database because Compact and Repair requires exclusive access.
Use Access’s Compact and Repair Database command, following Microsoft’s repair instructions. Afterwards, check important tables, forms and reports before returning the file to use. Repair cannot correct network permissions and may not recover all damaged data.
Reduce recurring problems in a shared database
For a database used by several people on a local network, consider a split design: shared tables in a back-end file and a separate local front-end for each user. The front-end contains forms, reports, queries and links to the shared tables. The back-end still needs suitable permissions and a reliable connection.
Keep backups and schedule maintenance when users can close their sessions. Record which accounts and computers are affected if the error returns; this gives your administrator a useful starting point.
For other Office issues, browse the Microsoft Office guides. If you are also investigating a licence problem, the articles on Office activation using Command Prompt and checking Office product-key information using Command Prompt cover those separate tasks.
Start with the affected user’s folder-access test, then retry opening the database in shared mode. If it still fails, send IT the exact error, database path and test result.
Other editions for separate workloads
Other editions for separate workloads; prices in AUD, confirm the total on the listing.
-

Windows 11 Pro key
$14.99 AUD
$29.00 -

Office 2024 Pro Plus key
$20.00 AUD
$39.00 -

Windows 11 Home key
$18.88 AUD
$37.00
How to check this worked
- Open Settings, System, Activation and confirm the edition shown.
- Enter the key and run activation; expect a green tick within a minute.
- Reboot and re-check activation survives the restart.
FAQ
What else should you know before buying?
- What do I need before starting?
- Read the requirements and confirm the edition first; the steps assume the machine is compatible.
- How do I know the licence is genuine?
- Activate on Microsoft's servers and check Settings, System, Activation. A working activation is the test.
- Is this a subscription?
- Keys sold here are one-time lifetime licences. Microsoft 365 plans are billed by Microsoft instead.
- What if the key fails?
- Email hi@ms.codes with the order number and a screenshot. Replacement or refund applies within 30 days.
Check who prepared and reviewed this guide
- Written by
- MS.Codes editorial
- Reviewed by
- Support team
Last verified: (source review; see test status above).