Microsoft KB Archive/839782

From BetaArchive Wiki

Article ID: 839782

Article Last Modified on 7/28/2006



APPLIES TO

  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
  • Microsoft Access 2000 Standard Edition





Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access database (.mdb).


SYMPTOMS

When you open a Microsoft Access database object, such as a form, a report, a macro, or a module in Design view, you may receive the following error message:

You do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them later.

This error message occurs even if there is only one user in the database.

CAUSE

If the database file and the workgroup information file have the same name and are located in the same folder, two record-locking information files (.ldb) are created when an Access object is opened. This causes the error message that is mentioned in the "Symptoms" section.

Note By default, the record-locking information file is created with the same file name as the workgroup information file. The record-locking information file is also created in the same folder as the workgroup information file. The record-locking information file has an .ldb file name extension.

WORKAROUND

To work around this problem, use one of the following methods:

  • Rename the database file to make sure that only one .ldb file is in the folder that contains the database file and the workgroup information file.
  • Move the database file to another folder.
  • Open the database exclusively.


MORE INFORMATION

Steps to reproduce the problem

Create a new workgroup information file for your Microsoft Access 2000 database

To do this, follow these steps:

  1. Click Start, and then click Run.
  2. In the Run dialog box, type Full path of Wrkgadm.exe in the Open box.


Note By default, the Wrkgadm.exe file is located in the C:\Program Files\Microsoft Office\Office\1033 folder.

  1. In the Workgroup Administrator dialog box, click Create.
  2. In the Workgroup Owner Information dialog box, type Northwind in the Name box, and then type 5 in the Workgroup ID box.
  3. Click OK.
  4. In the Workgroup Information File dialog box, type the location that you want to save the file to, and then click OK.
  5. In the Confirm Workgroup Information dialog box, click OK.
  6. In the Workgroup Administrator dialog box, click OK.

Create a new workgroup information file for your Microsoft Access 2002 database and for your Microsoft Office Access 2003 database

To do this, follow these steps:

  1. Start Access 2002 or Access 2003.
  2. Open the Northwind.mdb sample database.
  3. On the Tools menu, point to Security, and then click Workgroup Administrator.
  4. In the Workgroup Administrator dialog box, click Create.
  5. In the Workgroup Owner Information dialog box, type Northwind in the Name box, and then type 5 in the Workgroup ID box.
  6. Click OK.
  7. In the Workgroup Information File dialog box, type the folder location of the database file. In the Workgroup box, type the file name Northwind.mdw, and then click OK.


Note Make sure that the Workgroup Information file has the same file name and the same folder location as the database file.

  1. In the Confirm Workgroup Information dialog box, click OK.
  2. Close Access 2002 or Access 2003.
  3. Join the newly-created workgroup information file that you created in steps 1 through 8.
  4. Start Access 2002 or Access 2003.
  5. Open the Northwind.mdb sample database.
  6. Open an Access database object, such as a form, a report, a macro, or a module.


You may receive the error message that is mentioned in the "Symptoms" section.

When you open an Access database, if both the database file (.mdb) and the workgroup information file (.mdw) have the same name, a record-locking information file (.ldb) is created for the .mdw file and an entry that indicates that the database file is open is added to the .ldb file. After the .mdb file is opened, Access detects an .ldb file with the same name as the .mdb file in the same folder, and therefore adds another entry to the .ldb file. The entries in the .ldb file now indicate that there are two users in the database. Therefore, when you open a database object, such as a report in Design view, Access may detect two active connections in the .ldb file. This may cause the error message that is mentioned in the "Symptoms" section. This error message indicates that the user does not have exclusive access to the database.

If you open the database, close the database without closing Access, and then you open the database again exclusively, you may be able to view the database object in Design view. When you open the database the first time, the .mdw file is accessed, and therefore the .ldb file is created. Two active-connection entries are written to the .ldb file. One active-connection entry is for the .mdw file, and the other active-connection entry is for the .mdb file. When you close the database, the second active-connection entry in the .ldb file may be removed or may be modified to indicate that the user is no longer connected. Subsequently, when you open the database exclusively, Access may not create an .ldb file or may not write an entry to the .ldb file because Access detects only one active entry in the .ldb file. You can open a report in Design view because Access detects only one user in the database.

REFERENCES

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

225938 "You do not have exclusive access..." message appears more than once when editing module


200290 Exclusive lock required for saving design changes to Access objects


305541 Understanding the role of workgroup information files in Access security



Additional query words: acc2000 Acc2000 acc2002 Acc2002 acc2003 Acc2003 mdw ldb

Keywords: kbsecurity kbdatabase kberrmsg kbprb KB839782