?
Solved

Cannot change Switchboard width in Access

Posted on 2011-04-27
5
Medium Priority
?
639 Views
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......
0
Comment
Question by:CSHTech
  • 3
  • 2
5 Comments
 
LVL 75
ID: 35476941
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.

mx
0
 

Author Comment

by:CSHTech
ID: 35477044
Thanks for your reply.

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

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 35477138
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.

mx
Capture1.gif
Capture2.gif
0
 

Author Closing Comment

by:CSHTech
ID: 35477837
Many thanks!
0
 
LVL 75
ID: 35477975
You are welcome ...

mx
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

850 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