Microsoft KB Archive/163619

= ACC95: Screen.ActiveControl Causes IPF If No Forms Active =

Article ID: 163619

Article Last Modified on 11/17/2000

-

APPLIES TO


 * Microsoft Access 95 Standard Edition

-



This article was previously published under Q163619



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



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



Steps to Reproduce Problem
 Open the sample database Northwind.mdb, and create a new form. Add a textbox.  Add the following code to the Load event of the form:

Private Sub Form_Load MsgBox Screen.ActiveControl.Name End Sub  Close and save the form as frmTest. On the Tools menu, click Startup.</li> Click to clear the Display Database Window check box.</li> In the Display Form combo box, click frmTest, and then click OK.</li> Close the Northwind.mdb database.</li> Re-open the Northwind.mdb database. Note that you receive the error message mentioned in the "Symptoms" section.</li></ol>

Additional query words: ipf crash

Keywords: kberrmsg kbbug kbfix kbusage KB163619

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.