ACC: IPF Referencing ControlSource Containing Code

Last reviewed: March 11, 1998
Article ID: Q171179
The information in this article applies to:
  • Microsoft Access versions 7.0, 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

The ControlSource property of a text box on a form causes Microsoft Access to return an Invalid Page Fault when switching from Form view to Design view.

This behavior occurs when the ControlSource property contains a function that changes the value of the control.

CAUSE

An attempt is made to change the ControlSource property of the control while it is being evaluated.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and 97. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

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. Open a new blank database in Microsoft Access 7.0 or 97.

  2. Create a new module and type the following procedure:

          Function MyFunction()
    

             Forms(0).Controls(0).ControlSource = ""
    
          End Function
    
    

  3. Create a new form in Design View.

  4. Add a text box to the form and type the following in the ControlSource property of the text box:

          =MyFunction()
    

  5. On the View menu, click Form View (or Form in Microsoft Access 7.0).

  6. On the View menu, click Design View (or Form Design in Microsoft Access 7.0).

    Note that Microsoft Access returns an Invalid Page Fault.


Additional query words: access violation
Keywords : FmsProb kberrmsg kbusage
Version : 7.0 97
Platform : WINDOWS
Hardware : x86
Issue type : kbbug
Solution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 11, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.