Unable to open your database just because it is showing “File Already In Use Error” each time when you try to open it? Wants to get rid of this error but unable to do so?
Well, your searching ends here as this tutorial contains the answers for your queries. So just stick with the post and know the best knowledge on how to fix Access File Already In Use Error whether it is occurred in any of the Access 2010/ 2013/2016 version.
What Are The Symptoms Of Could Not Use File Already In Use Error?
Access file already in use error usually comes when you try to open a database that is located on a server. At that time you may receive the following error message:
Couldn’t use <filename>; file already in use.
Other Related Could Not Use File Already In Use Error:
- MS ACCESS ERROR MESSAGE: “COULD NOT USE ‘ADMIN’: FILE ALREADY IN USE.”
- error: 3045 “Could Not Use Database; File Already in Use” while trying to open forms using linked data.
- Failed to connect to database ‘MainDB.gxdb’.
- ErrNo:-2147467259 Details :Could not use ”; file already in use.
- Cannot compact/repair db because file is already in use
What Are The Reasons Behind Access File Already In Use Error?
If a user opens a database and doesn’t create rights for the folder in which the database is located. Then the Microsoft jet database engine can’t create the locking information file i.e *.ldb in Access 2003 or in previous version and *.laccdb in Access 2007/2010/2013/2016 version. This locking information file is compulsory for multiple users to open the database. Thus a user doesn’t have create rights opens the database exclusively if a corresponding .ldb file or .laccdb file doesn’t exist.
Reason can also be that the database file or database folder doesn’t have necessary security permissions to write, delete an .ldb or .laccdb file created by Microsoft Access when opening the database.
The database file doesn’t have enough security permissions or write permissions to be modified when updating data in it. The web browser is noticed by the web server as Internet User that has the server account IUSR. So, user must need to have write permission to the database file and to the database folder.
Methods To Fix “Access 3045 – File Already In Use” Error
There might be time when you want to open database and you came across an error “could not use file already in use” when you share the same Access database file after splitting it.
The error usually arises when you try to open database file in Exclusive mode.
To fix this, you just need to simply open the file with shared mode. Below here is the complete steps that what you should do, and it will surely fix your problem.
Go the Tools->Options->Advanced. And here change the default open mode from Exclusive to Share.
If in case you are opening MS Access DB file from another MS access file using OpenDatabase function, then apply the below code to get away this error. This is also related to open mode.
Set gblWS = DBEngine.Workspaces(0)
Set gblExtDB = gblWS.OpenDatabase(“[file name]”, False, False)
Here the first parameter is string of path and file name of your DB file. Whereas, second parameter is the key to solve this problem. It is the open mode; where false is Shared Mode and true is Exclusive Mode.
Last parameter is read-only option. So set this to false and you can write to the DB file.
You need to share the ‘C:\<database name>’ folder with the windows users and give change permission on the Share as well.
Things To Do:
- Make a right click on the database folder and click on properties. This will open the properties dialog box.
- Tap to the ‘sharing tab ‘option and enable sharing.
- Hit the ‘Permissions‘ button present on that dialog box. Make sure you have added the users who will need to work with database to this list, and give the user ‘Modify’ permission.
- Tap to the OK option. Now start the database again, it should open this time without any issue.
Be sure that you give Modify/Write permissions on the folder to all the Windows users who will use the Access database in a multi-user environment.
If this does not resolve the issue then move to Step 2.
Method 3 :
If you are using a MS Access based DB then in some cases the access based gets locked by the Windows user accessing the shared file. You can restart the server again to fix this, or if in case server restart won’t work then you can find out which Windows user is actually accessing the shared drive and restart the client machine that is accessing the file. After then start the database, now you will be able to use it.
- Use windows explorer to fetch the folder on the disk that contains the data base file (.mdb).
- Make a right click on the Project Folder and select Properties.
- Make uncheck to the Read-Only
- Tap to the Security tab in the properties window
If you don’t get such tab in windows XP system , then close the properties window, open any folder , select tools>folder options>view and make uncheck to the option Use simple file sharing.
- Click Add And Find, then select the user IUSR_<COMPUTERNAME>.
- Select the write checkbox in the Allow; column to assign the write permission to the IUSR account.
One of the most common reasons behind this MS Access “Could Not Use Database; File Already in Use” Error can also be the corruption of Access database.
Well if this is the case, then the most recommended option is to make use of Access Database Repair Tool which is specifically designed to troubleshoot any type of corruption issue occurred in Access Database.
Some Extra Fixes To Solve Access Could Not Use File Already In Use Error:
- To prevent this Access file already in use error, the very first thing you need to do is just make sure that all users who have opened the database read, write and create rights for the folder in which the database is located.
- Secondly, if you are using a security enhanced Access database, you must make sure that the users who have opened the database also have read/write permission on the folder that contain the workgroup information (.mdw) file.
- The error occurs if another user has opened up the database exclusively and you try to open it. Chances are also that user opened the database in exclusive mode or made some modifications such as editing modules, which put the database in exclusive mode. so you need to change it to shared mode.
However that may not be the case. This error can also encounter even if the other user has database opened without opening it exclusively. So, why this time also getting the same error. Here is the answer for you….
What If The Other User Isn’t Opening it Exclusively?
It shows that another cause of this error is not immediately obvious and is related to workgroup security files. This applies to MDB file not applicable for ADP or ACCDB formats. If two instances of MS Access DAO database engine use different system MDW files, a conflict happens where the database appears to be exclusively locked by the other instances. The MDW file used by your instance of Access can be checked in VBA by checking out the value of DBEngine.SystemDB.
Another copy of Access or DAO may have that database opened using another MDW file and thus the conflict happen. This can also come from instances of MS Access such as Microsoft Access library reference or add-in, a VBA Add-in, or other program such as VB6, .NET, etc. That is connected to the database.
To prevent this, if you are using workgroup security be sure that every instance is pointing to the same shared MDW file. This is also defined in the shortcut used to launch Microsoft Access, or if you are opening a different database programmatically within your VBA code.
Hopefully you have got the perfect solution to resolve Access “Couldn’t Use Database; File Already In Use” error with the manual fixes. But if in case you fail to do so then try the alternative option i.e Access Database Repair N Recovery Software. This will surely resolve your Access Database “File Already In Use” error.
And do share your experiences with us regarding this blog after reading the complete post and most importantly after trying the fixes.