ACC: Resize Event on Pop-Up Form Does Not Occur as Expected (194114)



The information in this article applies to:

  • Microsoft Access for Windows 95 7.0
  • Microsoft Access 97

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.

MORE INFORMATION

Steps to Reproduce Problem

  1. Open the sample database Northwind.mdb.
  2. Open a new form in Design view, and save the form as frmPopup.
  3. On the View menu, click Properties, and then click the Other tab.
  4. Change the PopUp property to Yes.
  5. 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
    					
  6. Save the form, and then switch to Form view. Note that the message box appears.
  7. Click OK in the message box.
  8. Leaving the frmPopup form open, click the Database window.
  9. Open the Categories form and maximize it.
  10. Use your pointer to resize the frmPopup form. Note that the message box does not appear.
  11. Without closing the frmPop form, switch back to the Categories form and restore its size to a non-maximized state.
  12. Select the frmPop form and resize it with your pointer. Note that the message box appears.

REFERENCES

For more information about the behavior of maximized forms in Microsoft Access, please see the following articles in the Microsoft Knowledge Base:

147152 ACC: Maximizing One Form Maximizes All Forms (7.0/97)

121410 ACC: Maximizing One Form Maximizes All Forms

For more information about using custom form properties to expose the maximize and minimize status of forms in Microsoft Access 7.0 and 97 please see the following article in the Microsoft Knowledge Base:

141111 ACC: How to Determine If a Form Is Maximized or Minimized

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:kbbug kbpending KB194114