ACC95: Screen.ActiveControl Causes IPF If No Forms Active
ID: Q163619
|
The information in this article applies to:
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
- 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.
- Click to clear the Display Database Window check box.
- In the Display Form combo box, click frmTest, and then click OK.
- Close the Northwind.mdb database.
- Re-open the Northwind.mdb database. Note that you receive the error
message mentioned in the "Symptoms" section.
Additional query words:
ipf crash
Keywords : kberrmsg kbusage FmsProb
Version : 7.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 23, 1999