ACC2000: Fatal Error Message When You Close a Form After You Set the UniqueTable Property

ID: Q248932


The information in this article applies to:
  • Microsoft Access 2000

Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access project (.adp).


SYMPTOMS

When you are using a parameterized stored procedure as the initial record source for a form (by setting both the RecordSource and the UniqueTable properties of the form to the stored procedure), and you then change the record source of the form (by setting both the RecordSource and the UniqueTable properties of the form to a different data source, such as a table or query), and you then set the record source of the form back to the stored procedure (by setting both the RecordSource and the UniqueTable properties), when you view the form in Form view, or you close the form, you may receive one of the following error messages, and then Access quits:

In Windows 95 or 98

This program has performed an illegal operation and will be shut down.

If the problem persists, contact the program vendor.
When you click Details, the following message appears:
MSACCESS caused an invalid page fault in module MSACCESS.EXE at 015f:3003436d.
NOTE: The actual memory address may vary.

In Windows NT
MSACCESS.EXE - Application Error The instruction at "0x3003436d" referenced memory at "0x039c05d4". The memory could not be "written".
NOTE: The actual memory address may vary.


CAUSE

When you initially set the RecordSource property of the form to a parameterized stored procedure, and you expand the UniqueTable property (by opening the combo box), Microsoft Access tries to execute the stored procedure to retrieve the specified unique table. But, the execution of the parameterized stored procedure is not successful. When you then change the record source of the form to a different record source (a table or a query), and you view the form in Form view, or you try to close the form, Microsoft Access quits and produces an error message. Because the UniqueTable property does not successfully execute the parameterized stored procedure, Microsoft Access quits.


RESOLUTION


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample project NorthwindCS.adp. Be sure that you are connected to a valid NorthwindCS database on Microsoft SQL Server 7.0.


  2. Create the following stored procedure, and then save it as CustOrders:


  3. 
       CREATE PROCEDURE CustOrders
    	   @EnterCustomer varchar(5)
       AS
       SELECT Customers.CompanyName, 
              Customers.ContactName,
              Customers.Address,
              Orders.*
       FROM Customers INNER JOIN
             Orders ON Customers.CustomerID = Orders.CustomerID
       WHERE Customers.CustomerID = @EnterCustomer 
  4. Create a new form. Set the RecordSource property of the form (on the Data tab) to the CustOrders stored procedure. Look at the combo box list for the UniqueTable property (also on the Data tab). Note that you cannot set the UniqueTable property of the form because the stored procedure is parameterized.


  5. Change the RecordSource property of the form to the Customers table.


  6. Set the UniqueTable property to Customers.


  7. Set the RecordSource property back to CustOrders.


  8. View the form in Form view. When you are prompted for the parameter, type alfki.


  9. Close the form. When you are prompted to save the form, click either Yes or No.


Note that you receive one of the error message mentioned in the "Symptoms" section.

Additional query words: pra ipf gpf access violation

Keywords : kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.