How do I correct a File Sharing Lock?

Tom McCorkill 0 Reputation points
2025-10-26T04:09:29.8666667+00:00

I have apparently exceeded my file sharing lock count on Access. How do I clear it?

Microsoft 365 and Office | Access | For home | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Aashok Kumar Sharma 0 Reputation points
    2025-10-26T04:34:25.26+00:00

    Close all open instances, delete the locking file, compact and repair the database, check user permissions, and reduce simultaneous connections. If multiple users are opening the database simultaneously, consider splitting it into front-end and back-end scenarios or using SharePoint or SQL Server.

    0 comments No comments

  2. Flora-T 5,160 Reputation points Microsoft External Staff Moderator
    2025-10-26T08:29:51.7366667+00:00

    Hi Tom McCorkill

    Thank you for reaching out to Microsoft Q&A Forum and sharing your experience.

    I understand you're encountering an issue with Microsoft Access where the file sharing lock count has been exceeded.

    The file sharing lock issue in Microsoft Access typically occurs when multiple users or processes are accessing the same database file simultaneously, causing the lock count to exceed the allowed limit of 255 per user. Every version of Access uses a temporary lock file to manage this, it prevents simultaneous edits to the same records but contains no actual data. For newer databases (with .accdb extension), the lock file is .laccdb; for older versions (like 2002/2003 with .mdb), it's .ldb. These files should automatically delete when the last user closes the database, but sometimes they persist due to crashes, network instability, or incomplete closures, making the database appear locked and potentially triggering errors like "cannot delete Access record locking file". 

    To better understand, could you please share a few more details? 

    • What version of Access are you using (e.g., Access 2019 or Microsoft 365)?
    • Is the database stored locally on your device or on a shared network/cloud service?
    • Have there been any recent changes to the file, your environment, or how it's being accessed?
    • Are you seeing any error messages beyond the lock count exceeded notice?
    • Is this set up for multiple users? 

    Based on my research, here are some recommended steps you may consider trying. Before diving in, always back up your database file to prevent any data loss. 

    • Start by closing all instances of Access on your computer (and any others connected to the file): check Task Manager (Ctrl + Shift + Esc) for any lingering "msaccess.exe" processes and end them if needed.  
    • Next, navigate to the folder where your database is stored and delete the associated lock file, which will have the same name and location as your main database but with the .laccdb or .ldb extension (e.g., "MyDatabase.laccdb"). It's safe to remove this manually when everything is closed, though you might need admin privileges or to address permissions if you encounter deletion errors. 
    • You may also consider compacting and repairing the database: Open Access without loading the file, then go to File > Info > Compact & Repair Database, select your file. For shared databases on a network, double-check that you have full read/write permissions and that the connection is stable to prevent incomplete lock releases.  
    • As a last resort, restart your system. Once cleared, reopen the database using "Open Exclusive" mode initially via File > Open > Browse. 

    Please understand that our initial response may not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a resolution.  


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.