ACC2: GPF Creating Relationships Between Attached Tables (129769)



The information in this article applies to:

  • Microsoft Access 2.0

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

SYMPTOMS

When you create a relationship between two attached tables, you receive the following error message:
An error has occurred in your application. If you choose Ignore, you should save your work in a new file. If you choose Close, your application will terminate.

If you choose Ignore, you can save your work in a new file, but if you choose Close, you receive a second error message:
MSACCESS caused a General Protection Fault in module MSAJT200.DLL at 002B:06BD.

When you close the error message window, your application terminates.

CAUSE

The above error occurs when you use any two attached tables that do not have a relationship defined in the source database.

RESOLUTION

To work around this problem, you need to upgrade your installation of Microsoft Access with the Microsoft Access version 2.0 Service Pack.

STATUS

This problem no longer occurs with the Microsoft Jet database engine version 2.5. The Microsoft Jet database engine version 2.5 is available with the Microsoft Access version 2.0 Service Pack. For information about how to obtain the Service Pack, please see the following article in the Microsoft Knowledge Base:

122927 WX1124: Microsoft Access Version 2.0 Service Pack

MORE INFORMATION

Steps to Reproduce Problem

WARNING: Following these steps will cause a General Protection Fault on your computer. Make sure you save and close any open work on your computer before following these steps.
  1. Start Microsoft Access and create a new database named DB1.MDB.
  2. Close the new database, and then open it in shared mode by making sure that the Exclusive and the Read Only check boxes are not checked.
  3. Import the Orders table and the Employees table from the sample database NWIND.MDB.
  4. Attach the Orders table and the Employees table from DB1.MDB (the database that you have open). The attached Orders table is named Orders1 and the attached Employees table is named Employees1.
  5. Open the Orders table.
  6. With the Orders table open, press the F11 key to switch to the Database window, and then choose Relationships from the Edit menu.
  7. In the Add Table dialog box that appears, select the Orders1 table and the Employees1 table in the Table/Query box, and then choose the Add button.
  8. Create a relationship between the tables by dragging the Employee ID field from the Employees1 table to the Employee ID field in the Orders1 table.
  9. Check the Inherited Relationship and the Enforce Referential Integrity check boxes in the Relationships dialog box, and then choose the Create button. Note that you receive the error message:
    Couldn't lock table 'Orders'; currently in use.
  10. Choose the OK button.
  11. Cancel the Relationships dialog box by choosing the Cancel button.
  12. Close the Orders table, and then repeat steps 7 and 8. Note that you receive the error messages described earlier.

REFERENCES

For more information about creating relationships, search for "relationships between tables" then "Defining Relationships Between Tables" using the Microsoft Access Help menu.

Modification Type:MajorLast Reviewed:7/5/2002
Keywords:kbbug kberrmsg kbusage KB129769