Error 3051 - MS Access 2003

GayaTiga used Ask the Experts™
Run-time error '3051': The Microsoft Jet database engine cannot open the file C:\Program Files\MBRMS\xxfile.mdb.  It is already opened exclusively by another user or you need permission to view its data.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Check the permission on the file/folder.
Access can´t work in a read-only folder...

When the database is closed (probably will be since you can't open it;^) check to see it a file called xxfile.ldb exists in C:\Program Files\MBRMS\.  If it does, delete it.  You may need to reboot to delete it.

If you still cannot open the file check the security settings and share seltings.  

For databases on network computers, go to the level that is shared.  Usually that is an entire drive.  Right click on it and select "Sharing and Security". Make sure "Share this folder" is selected and there is a  share name that does not have a dollar sign ($) behind it in the drop down box. (The dollar sign share is a default share for administrator only.) IL there is not one, add it. Select a share without a dollar sign. Select permissions.  Make sure the users that will be using the DB have change and read permissions.  

Then right click on the folder(s) that contain the database(s) and select "Sharing and Security". Select security. Make sure the users have read, write, modify, and read & execute permissions. Select advanced. Edit the users that will access the databases. Make sure they have create files and delete permissions.

Then right click on the the database(s) and select "Sharing and Security". Select security. Make sure the users have read, write, modify, and read & execute permissions.

If you still cannot open it, the database Is probably corrupt:
Steps (approximately in order) to use to fix a corrupted Access database.


2) Compact and repair

3) Use jetcomp.exe;en-us;Q273956

4) decompile: in run: msaccess "dbPathName.mdb" /decompile
   Compact/repair:  in run: msaccess "dbPathName.mdb" /compact
   compile: in VB editor: debug> compile

5) Use a backup (you have a lot of those -- yes?)

6) If you can identify one or a few forms or reports causing problems, copy the problem form/report from a backup.  Or copy and paste a new copy of the form/report then copy and paste the code from the old form/report into the new form/report.  If a module, copy the code, create a new module, paste the code into the new module.

7) Create a new database, use File> Get external data> Import to get all objects of the damaged database and set up the options again.

8) Try a recovery tool:

9) Hire a company to repair the database

Additional information:
How to Troubleshoot/Repair Damaged Jet 3.0 and Prior Databases

How to Troubleshoot Corruption in a Microsoft Access Database;en-us;306204

Corrupt Microsoft Access MDBs FAQ
Chris BRetired
Often when a second user can't open a single db, it can be solved by - going to the pc who can open it. Open Access and navigate to the db in question. click once to select, then click the drop arrow next to Open, and select Open from the list. This will remove the exclusive, at least temporarily. Best solution is to create a front for each user, and a backend to share. Generally this solves all such issues.

Chris B
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Chris makes a good point.  When you get that message, is someone else using the DB?  Nico & I assumed no, Chis Assumed yes.
I vote for a three way split.  They are all good answers for the problem.
Chris BRetired


Chris B

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial