resizing a form on click

MR_G

Registered User.
Local time
Today, 14:21
Joined
Oct 14, 2008
Messages
35
this seems simple, but alas...

how do i use a toggle button to change the width of an active form?

i have tried using MoveSize and Forms!myform!.width =, and both just do nothing.

Thanks in advance!
 
Mr G,

MoveSize did nothing!

Are you sure you used the right units? They're TWIPs - 1,440 per inch.

Wayne
 
Width is a property like Top and Height for controls.

The easiest way is to make a macro and use MoveSize action. When you select the MoveSize action you will see the items for Width, Right etc at the bottom. The number entered is either for Centimetres or Inches.

If you narrow the Width it will narrow from the right side of the form and thus the form will no longer be centred. To offset that you need to put a number in for Right.

This is one area (mainly with Vista) where I have found code to do the same thing to be unreliable, DB will sometimes lock up.
 
PS,

Forgot to mention Waynes point, if using code use Twips for measurment, not inches or centimetres.

However, Twips are used in macros for setting postion/size of controls but that is not MoveSize
 
However, Twips are used in macros for setting postion/size of controls but that is not MoveSize
Twips are the unit of measurement you must use for any VBA or macro (including MoveSize)
 
Twips are the unit of measurement you must use for any VBA or macro (including MoveSize)

MoveSize macro action is entered in inches or cms, at least with Access 95 and Access 2003 that I have. Attached is one that is for real:D
 

Attachments

MoveSize macro action is entered in inches or cms, at least with Access 95 and Access 2003 that I have. Attached is one that is for real:D
Actually I did see that for Macros it is entered in inches or cms, but for VBA it is all about the TWIPS.
 
Thanks everyone,

I was unaware of the TWIP thing. I actually needed to do the resizing because I wanted to switch a subform from SingleForm to DataSheet view and the DataSheet view was wider, but only to discover, now I can make the form wider on a command button click, but I can't change the view format of the subform. :) Oh well, I started a new thread for that. Thank again everyone!
 

Users who are viewing this thread

Back
Top Bottom