BUG: You receive a "The search key was not found in any record" error message when you compact a database or save design changes in Access 2000 (301474)



The information in this article applies to:

  • Microsoft Access 2000

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

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

SYMPTOMS

When you try to save design changes to a new object, or when you compact a database, you receive the following error message:
The search key was not found in any record.
Additionally, you may see the database object listed in the Database window, although the save attempt failed. However, when you open the object, you receive the following error message:
The Microsoft Jet database engine cannot find the object <object name>. Make sure the object exists and that you spell its name and path name correctly.

CAUSE

This behavior occurs under one of the following circumstances:
  • The database was created while using a workgroup file (System.mdw) that is created with Microsoft Jet 4.0 Service Pack 4 (SP4) or earlier, and the workgroup file currently in use is created with Microsoft Jet 4.0 SP5.
  • After you install Microsoft Windows 2000 SP2, or after you apply Jet 4.0 SP5 to your computer, you use the User Level Security Wizard to secure the database, and you select the option in the wizard to create a new workgroup file.

RESOLUTION

To resolve this problem, obtain the latest Jet 4.0 service pack. For additional information about how to download the latest Jet 4.0 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

239114 How to obtain the latest service pack for the Microsoft Jet 4.0 Database Engine

STATUS

Microsoft has confirmed that this is a problem in Microsoft Jet 4.0 SP5.

This problem was corrected in the latest Jet 4.0 service pack.

MORE INFORMATION

The default workgroup file (System.mdw) that is installed with Microsoft Access is created with a pre-SP5 version of Microsoft Jet 4.0. Therefore, the problem occurs if you create a database by using this workgroup file, and then later join a workgroup file that is created with Microsoft Jet 4.0 SP5.

The Microsoft Jet database engine uses a security ID (SID) to uniquely identify user and group accounts. A SID of the account is determined by an encrypted combination of the user name and personal ID that is used to create the account.

This problem occurs when the SID of the Engine user account in the current workgroup file does not match the SID of the Engine user account that is used to create the database. The SID generated for the Engine account in workgroup files that are created with Microsoft Jet 4.0 SP5 differs from the SID generated for the Engine account in previous releases of Jet 4.0.

The Engine user is a special account that is used internally by the Jet database engine, and is not exposed through the Microsoft Access user interface. However, when the SID of the Engine account in the workgroup file does not match the SID of the Engine account that is used to create the database, the Jet engine does not recognize them as the same account. Therefore, you cannot save design changes made to new objects. However, you can save design changes made to previously existing objects.

For Microsoft Access-specific objects, such as forms, reports, macros, and modules, the object incorrectly appears in the Database window, although it is not actually saved. When you try to open one of these objects, Access returns an error message that it cannot find the object.

Steps to Reproduce the Behavior

  1. Use Microsoft Access to create a new, blank database on a computer that has not been upgraded to Microsoft Jet 4.0 SP5.
  2. Create and then save several objects such as tables, queries, and forms in the database.
  3. Quit Microsoft Access.
  4. Use the Workgroup Administrator utility (Wrkgadm.exe) to create a new workgroup file on a computer that has been upgraded to Microsoft Jet 4.0 SP5.
  5. Copy the database that you created in step 1 to the computer that has Microsoft Jet 4.0 SP5 installed.
  6. Start Microsoft Access, and open the database.
  7. Open a new form in Design view.
  8. Add several controls, and then close the form.
  9. When Microsoft Access prompts you to save the form, click Yes. Enter a name for the form, and then click OK. Note that you receive the following error message:
    The search key was not found in any record.
    Note that the form does not close.
  10. Close the form. Note that Microsoft Access prompts you to save the form again. Click No to close the form without saving the design changes. Note, however, that the form appears in the Database window, which indicates that it was saved.
  11. Open the form. Note that you receive the error message:
    The Microsoft Jet database engine cannot find the object <object name>. Make sure the object exists and that you spell its name and path name correctly.

Modification Type:MajorLast Reviewed:7/28/2004
Keywords:kbsavefile kbbug kberrmsg kbfix KB301474 kbAudDeveloper