Cannot change Switchboard width in Access

Posted on 2011-04-27
Last Modified: 2012-05-11
I have a Switchboard which opens in Access 2010 on startup, which is centred and is not maximised.

Can someone tell me how to reduce the width of the Switchboard - I cannot seem to change it in 'Properties' from 13.063cm and the title is showing some of the blue background, which I want to get rid of......
Question by:CSHTech
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Try this code in the On Load event of the form:

    Private Sub Form_Load()
        DoCmd.MoveSize , , 1440 * 5, 1440 * 7
    End Sub

    This example with make the Form (Switchboard) 5 inches wide and 7 inches high.


    Author Comment

    Thanks for your reply.

    Please excuse my ignorance but I'm not experienced with Access coding - how do you add this code....?
    LVL 75

    Accepted Solution

    Sure (see images below).
    Open the Form in Design view
    Open the Form Property sheet (Alt+Enter)
    Select the Event tab
    On the On Load line, drop down the list and select [Event Procedure], then click the Ellipsis. This takes you into the VBA code window for that event.
    Type (or Paste) in the line shown in the image (or what I posted above).
    Save the Form design changes (File>>Save)
    Also, be sure the Auto Resize property of the Form is set to No.


    Author Closing Comment

    Many thanks!
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    You are welcome ...


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now