ACC95: Form Size Shrinks Changing from Design View to Form View

Last reviewed: May 14, 1997
Article ID: Q148853
The information in this article applies to:
  • Microsoft Access version 7.0

SYMPTOMS

When you toggle a form back and forth from Design view to Form view, the form shrinks in size.

CAUSE

The form has its ScrollBars property set to Neither and one or more of the following properties set as follows:

   BorderStyle: (set to anything but "Sizable")

   -or-

   ControlBox: No

   -or-

   Min Max Buttons: (set to anything but "Both Enabled")

RESOLUTION

Create the following subroutine procedure in a global module

   Sub SizeToFitForm()
      ' Invoke the Window | Size to Fit Form menu command
      DoCmd.DoMenuItem 0, 7, 6, 0, acMenuVer70
   End Sub

and call it in the Open event of the form as follows:

   Private Sub Form_Open(Cancel As Integer)
      SizeToFitForm
   End Sub

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 open the Customers form in Design view.

  2. Set the form's ScrollBars property to Neither.

  3. Set one or more of the following properties:

          BorderStyle: (set to anything but "Sizable")
    

          -or-
    

          ControlBox: No
    

          -or-
    

          Min Max Buttons: (set to anything but "Both Enabled")
    

  4. Click the Form View button on the toolbar to view the form in Form view.

  5. Click the Form View button on the toolbar to change back to Design view.

  6. Repeat steps 4-5 a number of times. Note that the form's width shrinks in size each time you toggle the form.


Additional query words: scroll bar bars shrink shrinking
Keywords : FmsProp kbusage
Version : 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.