ACC2000: IPF Referencing ControlSource Containing Code

ID: Q210614


The information in this article applies to:

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 this to be a problem in the Microsoft products 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:



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

  4. Create a new form in Design View.


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



  6. 
    =MyFunction() 

  7. On the View menu, click Form View.


  8. On the View menu, click Design View.

    Note that Microsoft Access returns an Invalid Page Fault.


Additional query words: access violation pra ipf


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

Last Reviewed: May 13, 1999