ACC2000: IPF Referencing ControlSource Containing Code (210614)



The information in this article applies to:

  • Microsoft Access 2000

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

SYMPTOMS

When you switch a form from Form view to Design view, you may receive the following error message:
This program has performed an illegal operation and will be shut down. If the problem persists, contact the program vendor.
If you click Details, you receive an error message similar to the following:
MSACCESS caused an invalid page fault in module MSACCESS.EXE at 015f:300966b2.

CAUSE

This behavior occurs when the ControlSource property of a control on the form contains a function that tries to change the value of that control.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Problem

WARNING: Following these steps will cause an invalid page 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.
  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.
  6. On the View menu, click Design View.

    Note that Microsoft Access returns an Invalid Page Fault.

Modification Type:MajorLast Reviewed:11/29/2000
Keywords:kbbug kberrmsg KB210614