Whenever you open an MSAccess file (*.accdb, *.accde, *.mdb, *.mde) a locking file is created (*.laccdb, *.lde). Theoretically, this file is supposed to help with locking problems and track who is using the MSAccess database.
But like all other Microsoft files, when more than 3 users open the file, it becomes problematic, especially if 1 of those users connection is suddenly lost.
The typical resolution to this is to have all users close out of the MSAccess database and then 1 user opens it and compacts/repairs the database. After that user closes out, if the locking *.laccdb file goes away, it's then ok for everyone to get back in.
The problem though is what the user who got suddenly disconnected was doing. If they were entering data via a form, it's possible the form is also corrupt. In the older days, the table would often get corrupt.
Here are some possible solutions to resolve a constant locking issue:
If using MSAcces tables, split the MSAccess file into a backend/frontend if possible. Put the table(s) in the backend MSAccess file and link them into a new MSAccess frontend file. Have the users only open the frontend. That way if the MSAccess frontend file (or a form) becomes corrupt, there's a good chance your main data table is still safe.
We're not done here though!
We want some way to 'clone' the frontend and then open the cloned frontend. MSAccess doesn't really do this by itself when you open the MSAccess file. There are a couple of ways to do this.
1. You can design a *.bat file and use the xcopy command to copy the frontend to the user's desktop computer (ie. hidden folder such as c:\Databases). I would only recommend this method if using a SQL Server linked table and an ODBC connection. The only problem is that you can't utilize the Windows LoginID in the cloning process in a *.bat file so you have to clone the frontend to the user's desktop computer.
2. You can design a *.vbs script. The advantages of designing a vbs script is that you can grab the Windows LoginID and use that in the cloning process (hence: MyDB.accdb becomes MyDBpakohn.accdb). See https://www.accessforums.net/showthread.php?t=7572 as an example vb script. Note that this is a simple vb script to clone/open an MSAccess file (or any other file). It has no confidential information in it and uses the .net framework like other vb scripts. You can edit the *.vbs file with a simple notepad editor.
Note that you'll also want to follow simple naming rules for your folders and files. Folders/Files with spaces and non-alpha characters become problematic in any kind of script/code and often require adding special characters to work.
If using an MSAccess backend, see the attached example and the DataEntry form showing how to design an unbound form.
If using a SQL Server backend, see the attached example and the module called: "Create ODBC" to automatically handle creating/updating the ODBC.
Also included in the example is a method to close an MSAccess form after 10 minutes of inactivity, an export routine to export queries easily as excel files (with dates/times), a query reporting and view form to see data in an excel style format (with a timer to close after 10 minutes of inactivity) and a query creating form to allow the user to create/save their own queries (temporarily). There is also a module to remove the MSAccess background and make it a true pop-up style application.
The excel style MSAccess form in this example lets users filter/query data via the column headings and a query can be designed as a snapshot (non-editable) or General (users can make edits). You can also freeze specific columns in the query. Feel free to use the technique and link your own tables/queries into the interface.