ACC: "Couldn't Open File" in Shared Environment Error Message (103254)



The information in this article applies to:

  • Microsoft Access 1.0
  • Microsoft Access 1.1
  • Microsoft Access 2.0
  • Microsoft Access for Windows 95 7.0
  • Microsoft Access 97

This article was previously published under Q103254
Moderate: Requires basic macro, coding, and interoperability skills.

SYMPTOMS

When you open multiple instances of a Microsoft Access database, even though multiuser options have been set, you may receive the following error message.

In Microsoft Access 7.0 and 97:

Couldn't use '<path>\databasename.mdb'; file already in use.

In Microsoft Access versions 1.x and 2.0:

<Database name> This file is already in use. Use a new filename or close the file in use by another program.

CAUSE

This problem can occur if you try to open a shared database by choosing it from the list at the bottom of the File menu instead of using the Open Database command on the File menu. When you open a database by choosing it from the bottom of the File menu, Microsoft Access opens the database with the same settings as the last time it was opened. If that database was last opened in Exclusive mode, clicking it from the bottom of the File menu will attempt to open it again in Exclusive mode, even if your Default Open Mode option is set to Shared.

This problem will also occur when the database is on a read-only drive and the first user to open the database has Read rights to the folder.

RESOLUTION

Running a single instance of Microsoft Access, open that particular database with the Open Database command on the File menu. Then close the database, thereby saving the correct settings to the database.

MORE INFORMATION

Steps to Reproduce Behavior

This problem occurs when Microsoft Access is being shared on a network, but can be reproduced on a stand-alone computer with the following steps:
  1. Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0) by clicking Open Database on the File menu. Click to select the Exclusive check box, and then click Open.
  2. On the Tools menu, click Options.

    NOTE: In versions 1.x and 2.0, on the View menu, click Options.
  3. Click the Advanced tab and set the Default Open Mode to shared.

    NOTE: In versions 1.x and 2.0, the Default Open Mode is in the Multiuser/ODBC settings.
  4. Quit Microsoft Access.
  5. Restart Microsoft Access, and then open the sample database Northwind.mdb by selecting the database from the bottom of the File menu.
  6. Start a second instance of Microsoft Access.
  7. Open the sample database Northwind.mdb by clicking Open Database on the File menu. Note that you receive the error message.

Modification Type:MajorLast Reviewed:5/6/2003
Keywords:kberrmsg kbprb KB103254