ACC: Resize Event on Pop-Up Form Does Not Occur as Expected
ID: Q194114
|
The information in this article applies to:
-
Microsoft Access versions 7.0, 97
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
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:
Q128196 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
- 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
- Save the form, and then switch to Form view. Note that the message box
appears.
- Click OK in the message box.
- Leaving the frmPopup form open, click the Database window.
- Open the Categories form and maximize it.
- Use your pointer to resize the frmPopup form. Note that the message
box does not appear.
- Without closing the frmPop form, switch back to the Categories form
and restore its size to a non-maximized state.
- 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:
Q147152 ACC: Maximizing One Form Maximizes All Forms (7.0/97)
Q121410 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:
Q141111 ACC: How to Determine If a Form Is Maximized or Minimized
Additional query words:
pra height width size modal
Keywords : FmsEvnt
Version : WINDOWS:7.0,97
Platform : WINDOWS
Issue type : kbbug