Microsoft KB Archive/129769

= ACC2: GPF Creating Relationships Between Attached Tables =

Article ID: 129769

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



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



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.

 Start Microsoft Access and create a new database named DB1.MDB. 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. Import the Orders table and the Employees table from the sample database NWIND.MDB. 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. Open the Orders table.</li> With the Orders table open, press the F11 key to switch to the Database window, and then choose Relationships from the Edit menu.</li> 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.</li> 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.</li> 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.

</li> Choose the OK button.</li> Cancel the Relationships dialog box by choosing the Cancel button.</li> Close the Orders table, and then repeat steps 7 and 8. Note that you receive the error messages described earlier.</li></ol>

<div class="references_section">