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:


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          : kberrmsg kbusage FmsProb 
Version           : 7.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: April 23, 1999