ACC95: Screen.ActiveControl Causes IPF If No Forms Active

Last reviewed: July 29, 1997
Article ID: Q163619
The information in this article applies to:
  • Microsoft Access 7.0

SYMPTOMS

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

If you use the Screen.ActiveControl property on your Startup form, 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.

When you click the Details button on the screen displaying this error message, you will see the following details:

   MSACCESS caused an invalid page fault in module MSACCESS.EXE
   at 0137:50016109.

CAUSE

This problem occurs if you do the following three things:

  • You have clicked to clear the Display Database Window check box in the Startup dialog box on the Tools menu.
  • You have a form opening when the database opens, either with an AutoExec macro or from the Display Form combo box in the Startup dialog box.
  • You are calling the Screen.ActiveControl property from an opening event of your startup form, such as the Load event or the Open event.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.

MORE INFORMATION

Steps to Reproduce Problem

  1. Open the sample database Northwind.mdb, and create a new form.

  2. Add a textbox.

  3. Add the following code to the Load event of the form:

          Private Sub Form_Load()
    
             MsgBox Screen.ActiveControl.Name
          End Sub
    
    

  4. Close and save the form as frmTest.

  5. On the Tools menu, click Startup.

  6. Click to clear the Display Database Window check box.

  7. In the Display Form combo box, click frmTest, and then click OK.

  8. Close the Northwind.mdb database.

  9. Re-open the Northwind.mdb database. Note that you receive the error message mentioned in the "Symptoms" section.


Additional query words: ipf crash
Keywords : FmsProb kberrmsg kbusage
Version : 7.0
Platform : WINDOWS
Hardware : x86
Issue type : kbbug
Solution Type : kbfix


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: July 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.