ACC: IPF Referencing ControlSource Containing Code (171179)



The information in this article applies to:

  • Microsoft Access for Windows 95 7.0
  • Microsoft Access 97

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

SYMPTOMS

When you switch a form from Form view to Design view, you receive an invalid page fault.

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 this to be a problem in Microsoft Access 7.0 and 97.

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 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.

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:kbbug kberrmsg KB171179