ACC1x: GP Fault When Creating a Dynaset from Form Dynaset

ID: Q98672


The information in this article applies to:


SYMPTOMS

When attempting to create a dynaset based on a form's dynaset, you will get a general protection (GP) fault similar to:


   Application Error

   MSACCESS caused a General Protection Fault in module
   MSACCESS.EXE at 00B0:09B5 


CAUSE

This functionality is unsupported. Instead of returning an error message explaining this, Microsoft Access causes a GP fault. Microsoft Access does not support creating a dynaset based on a form's dynaset.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 1.0. This problem no longer occurs in Microsoft Access version 1.1.


MORE INFORMATION

In Microsoft Access version 1.0, the following steps will reproduce a GP fault.

In Microsoft Access version 1.1, the following steps will correctly return the following error message, indicating that this functionality is not supported:

Can't perform operation; it is illegal

Steps to Reproduce Problem

In the following example, the Clone method is used to create a duplicate dynaset based on a form's dynaset. This is incorrect usage of the Clone method.
  1. Open the Categories form in the sample database NWIND.MDB.


  2. Create a new module, with the following Declarations section:
    
       '*********************************************************
          'Declarations Section of the module.
    
       '*********************************************************
          Option Compare database
          Dim DS as Dynaset, DS2 as Dynaset, F as Form 


  3. From the View menu, choose the Immediate window.


  4. Type the following lines in the Immediate window, pressing ENTER after each line:

    Set F=Forms!Categories![Categories Subform].Form
    Set DS=F.Dynaset.Clone()
    Set DS2=DS.CreateDynaset()


The error will occur after the third line.


REFERENCES

For more information, search for "clone," then "Clone Method" using the Microsoft Access Help menu.

Additional query words: gpf createdynaset


Keywords          : kbprg PgmObj 
Version           : 1.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 23, 1999