logo
search
Microsoft 365 Error Codes

How to Fix Microsoft Access Error 3009: Record or Table Is Locked

Maira MehtabMaira Mehtab Sep 21, 2026 869 views

Question details

The user encounters Error 3009 in Microsoft Access indicating a record or table is locked, typically occurring when running a macro a second time, leaving an orphaned .ldb file.

Product
Microsoft Access
Device & OS
not provided
Scenario
Running a macro multiple times or attempting to access a table while previous connections remain active.
Observed behavior
Access reports Error 3009. An .ldb lock file remains after closing the application, requiring a forced End Task via Task Manager, even with no other users connected.
Before you start

Before proceeding, verify that no other users on your network currently have the database open, and ensure you know the folder location where your Access database file is stored.

Solution 1Recommended

Force Close Access Processes and Remove the Lock File

Use Task Manager to completely shut down stuck Access processes that are holding the database lock, then manually delete the orphaned lock file.

When Access fails to close properly, a background process may keep the database locked, preventing you from reopening it or running macros. Clearing the lock file (.ldb or .laccdb) forces the database to release all connections.

1
Open Task Manager

Right-click the Windows taskbar and select 'Task Manager', or press Ctrl + Shift + Esc on your keyboard.

2
End Background Processes

Under the 'Processes' or 'Details' tab, locate 'MSACCESS.EXE' or 'Microsoft Access'. Select the process and click 'End Task' to force close it.

3
Locate the Lock File

Open File Explorer and navigate to the folder where your database is stored. Look for a file with the exact same name as your database but with an '.ldb' or '.laccdb' extension.

4
Delete the Lock File

Right-click the lock file and select 'Delete' to manually release the database lock.

Tip: If you cannot delete the lock file, restart your computer to sever any hidden network or system connections holding the file.
Free Microsoft Office alternative

Looking for a Lightweight Alternative for Word, Excel, and PowerPoint?

While Microsoft Access handles complex databases, WPS Office is an excellent, free alternative for your daily document, spreadsheet, and presentation needs. It is lightweight, highly compatible with Microsoft Office formats, and easy to use.

  1. 1. Download the Installer: Visit the official WPS website and click the download button to get the latest version.
  2. 2. Install the Software: Run the downloaded installer and follow the on-screen instructions to complete the setup.
  3. 3. Open Your Office Files: Launch WPS Office and open your existing Word, Excel, or PowerPoint files without losing any formatting.
100% free for core document, spreadsheet, and presentation functions.Seamless compatibility with Microsoft Office formats (.docx, .xlsx, .pptx).Lightweight application that uses minimal system resources.Built-in PDF reader and editor for complete document management.
microsoft office alternative - wps office

Frequently Asked Questions

What is an .ldb or .laccdb file in Microsoft Access?

It is a lock file created automatically when an Access database is opened. It keeps track of which users are currently accessing the database to prevent conflicting changes.

Why does the lock file remain after I close Access?

The lock file may remain if Microsoft Access crashes unexpectedly, if a background process is still holding a connection to the database, or if VBA code fails to release a recordset properly upon completion.

Can I prevent Error 3009 by changing my database settings?

Error 3009 is usually caused by unclosed connections or stuck processes rather than configuration settings. Ensuring proper VBA code cleanup and running the 'Compact and Repair Database' utility regularly can help minimize these issues.