adjusting form width

  • Thread starter Thread starter form width via AccessMonster.com
  • Start date Start date
F

form width via AccessMonster.com

i have a problem with regards setting the form's width. I set the width to 4.
1 ang i have a button named "show all" that when clicked will make the form
much longer with a width of 7 and that will reveal all other informations
that was hide when the form loads and i cant do it.

I have tried on the click event of the button this code.

form.width=7 but it doesnt work..
thanks
 
In vb the width will be in twips.
Try reading the current setting then set by adding .75 of its value to it.
 
Is that 7 inches? Assuming that your button is on the form, I would try

Me.Width = 7*1440

Widths are stored in TWIPS (1440 to the inch, 667 to the centimeter)
 
can i put this in the buttons click event?

John said:
Is that 7 inches? Assuming that your button is on the form, I would try

Me.Width = 7*1440

Widths are stored in TWIPS (1440 to the inch, 667 to the centimeter)
i have a problem with regards setting the form's width. I set the width to
4.
[quoted text clipped - 7 lines]
form.width=7 but it doesnt work..
thanks
 
Yes, you should be able to. Me.Width changes the width of the form, but not
the width of the window displaying the form.

If you want to resize window showing the form then you need to use
DoCmd.MoveSize ,, 7 * 1440


Just to make sure we are talking the same thing.
Open the form in design view
Click on the button
In the button's property sheet, on the Event tab, set On Click to "[Event
Procedure]"
Enter the code that does what you want.

After pondering about what you might want, I believe the code you want is
the DoCmd.MoveSize version.

asset number via AccessMonster.com said:
can i put this in the buttons click event?

John said:
Is that 7 inches? Assuming that your button is on the form, I would try

Me.Width = 7*1440

Widths are stored in TWIPS (1440 to the inch, 667 to the centimeter)
i have a problem with regards setting the form's width. I set the width
to
4.
[quoted text clipped - 7 lines]
form.width=7 but it doesnt work..
thanks
 
Back
Top