Microsoft KB Archive/194114

= ACC: Resize Event on Pop-Up Form Does Not Occur as Expected =

Article ID: 194114

Article Last Modified on 1/23/2007

-

APPLIES TO


 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q194114



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
When you assign code to the Resize event of a pop-up form, the code may not run.



CAUSE
In Microsoft Access, if you have any other object maximized at the same time, the Resize event of a pop-up form occurs only when the form is opened.



RESOLUTION
If you have a pop-up form that uses the Resize event, make sure no maximized objects are open when you resize it.

If the maximized object is a form, you can instead give it the appearance of maximization by retrieving the dimensions of the screen, and then resizing the form to those coordinates. For more information, please refer to the following Microsoft Knowledge Base article:

128196 ACC: Maximized Form Shows Control Box, Min/Max/Restore Buttons



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 97.



Steps to Reproduce Problem
 Open the sample database Northwind.mdb. Open a new form in Design view, and save the form as frmPopup. On the View menu, click Properties, and then click the Other tab. Change the PopUp property to Yes.  Click the Events tab, and set the OnResize property of the form to the following event procedure: Private Sub Form_Resize MsgBox "Hello World." End Sub </li> Save the form, and then switch to Form view. Note that the message box appears.</li> Click OK in the message box.</li> Leaving the frmPopup form open, click the Database window.</li> Open the Categories form and maximize it.</li> Use your pointer to resize the frmPopup form. Note that the message box does not appear.</li> Without closing the frmPop form, switch back to the Categories form and restore its size to a non-maximized state.</li> Select the frmPop form and resize it with your pointer. Note that the message box appears.</li></ol>

<div class="references_section">