How to control Form Height when it opens?

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

I have a long form and it won't fit on a screen.

I want it to open to a certain height and let the client scroll down to see
the rest.

I thought in design view I could adjust the size of the window for a form
when it opens.

No Workie now? Form opens as high as the screen is.

How can I set the opening height for a form?

If it is in properties... which ones... where do I click?? Upper left corner
of the form or on the form area itself?

thanks for any help.
 
Us the Move method of the form.

Example:
Dim lngHeight As Long, lngWidth As Long
lngHeight = 1440 * 5
lngWidth = 1440 * 7
Me.Move 0, 0, lngWidth, lngHeight

This will move the upper, left corner of the form to the top, left of the
Access window then size the form width to 7" and form height to 5". The
value is in Twips. There are 1440 Twips per Inch. If you are using metric,
there are approximately 566.9 Twips per Centimeter. If you want the form to
fully fill the Access window, you could maximize it. However, if you
maximize one form, all forms will be maximized until you issue a Restore.
You could also size the form to fill the Access window without maximizing
it. To do this, you need API calls to get the size of the Access window and
allow for the toolbars. An example of doing this is in the link below. It
gets the information to put a picture in the Access window, so you don't
need all of the code in the example, just enough to get the window size.

http://www.mvps.org/access/forms/frm0042.htm

If your form is the only open, visible window inside Access, you can also
scale it to the Access window by using the Window menu Tile command.

RunCommand acCmdTileHorizontally
 
Back
Top