How to Determine Values for DoCmd.MoveSize in Microsoft Access
Question details
The user needs to find the exact numerical values to position and resize overlapping forms using the DoCmd.MoveSize method in MS Access.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Designing a database application with overlapping windows where menu forms need uniform positioning and sizing without trial and error.
- Observed behavior
- Needs to input four correctly scaled parameters (left, top, width, height) into the MoveSize VBA method.
Ensure your Microsoft Access database is set to use 'Overlapping Windows' instead of 'Tabbed Documents' in the Current Database options, otherwise the MoveSize command will be ignored.
Calculate Position and Size Using Twips
Convert your desired inches or centimeters into twips, which is the unit of measurement required by the MoveSize method parameters.
The DoCmd.MoveSize method expects its parameters (Right, Down, Width, Height) strictly in twips. A twip is a screen-independent unit where 1 logical inch equals 1,440 twips, and 1 centimeter equals roughly 567 twips.
Decide on the exact location and size for the form. For example, you may want to position a form 1 inch from the left edge and 1 inch from the top edge.
Multiply your inch measurements by 1440. To place the form 1 inch from the top and left, with a width of 6 inches and a height of 2 inches, calculate: Left=1440, Top=1440, Width=8640, Height=2880.
Open the form's VBA module. In the On Open event, write the code using your calculated values: DoCmd.MoveSize 1440, 1440, 8640, 2880.

Define Constants for Uniform Menu Sizes
Set up global constants in VBA to easily apply the same top, left, width, and height values across multiple forms.
Looking for a Lightweight Office Suite?
While Microsoft Access is a specialized database tool, everyday tasks require versatile document, spreadsheet, and presentation software. WPS Office is a fast, lightweight, and fully compatible alternative to Microsoft Office for your daily productivity needs.
- 1. Visit the WPS Website: Go to the official WPS Office website to find the free installer.
- 2. Download the Installer: Click the Free Download button for your operating system (Windows, Mac, Linux, iOS, or Android).
- 3. Install and Explore: Run the downloaded file and enjoy creating and editing documents with complete Microsoft Office compatibility.

Frequently Asked Questions
What exactly is a twip in Microsoft Access?
A twip is a screen-independent unit of measurement used internally by Visual Basic for Applications (VBA). One inch is equal to 1,440 twips, and one centimeter is roughly equal to 567 twips.
How do I resize a form without changing its position using DoCmd.MoveSize?
To resize a form without moving it, leave the Left and Top arguments blank but keep the commas in place, and provide values only for the Width and Height arguments. For example: DoCmd.MoveSize , , 8640, 2880.
Why isn't DoCmd.MoveSize working in my Access database?
The MoveSize method only works when your Access database uses overlapping windows. If your application interface is set to 'Tabbed Documents' (the default setting in newer versions of Access), all MoveSize commands will be ignored. You can change this in File > Options > Current Database > Document Window Options.




