ACC: MoveSize Action Does Not Position Form at Top of ScreenLast reviewed: May 30, 1997Article ID: Q132010 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you use the MoveSize action to position a form at the top of the screen after hiding the form's toolbar with the ShowToolbar action, there is a gap between the menu bar and the top of the form equal in size to the hidden toolbar.
CAUSEThe MoveSize action is triggered before the ShowToolbar action can fully hide the toolbar.
RESOLUTIONTo work around this behavior, use one of the following methods:
Method 1 (All versions)Set the form's OnActivate property to the following event procedure:
Private Sub Form_Activate() ' In version 2.0, the DoCmd is written DoCmd <command> Me.TimerInterval=500 DoCmd.ShowToolbar "Form View", A_TOOLBAR_NO End SubSet the form's OnTimer property to the following event procedure:
Private Sub Form_Timer() ' In version 2.0, the DoCmd is written DoCmd <command> DoCmd.MoveSize 0, 0 Me.TimerInterval=0 End Sub Method 2 (Versions 2.0 and 7.0 only)Set the form's OnActivate property to the following event procedure:
Private Sub Form_Activate() ' In version 2.0, the DoCmd is written DoCmd <command> Application.SetOption "Built-In Toolbars Available", False DoEvents Application.SetOption "Built-In Toolbars Available", True DoCmd.ShowToolbar "Form View", A_TOOLBAR_NO DoCmd.MoveSize 0, 0 End Sub STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESFor more information about SetOption, search for "SetOption" using the Microsoft Access Help Index. |
Keywords : FmsOthr kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |