[AccessD] Detect form height

Joseph O'Connell joconnell at indy.rr.com
Fri Mar 12 15:25:45 CST 2004


Fred,

You will need to capture the height of each section in the OnClose event.
    lngHeaderHeight = Me.Section(acHeader).Height
    lngDetailHeight = Me.Section(acDetail).Height
    lngFooterHeight = Me.Section(acFooter).Height

To restore the form to its original dimensions, reverse the statements in
the OnOpen event
    Me.Section(acHeader).Height = lngHeaderHeight
    Me.Section(acDetail).Height = lngDetailHeight
    Me.Section(acFooter).Height = lngFooterHeight

Of course you will need to store the values in the OnClose event and
retrieve them in the OnOpen event.

Joe O'Connell


-----Original Message-----
From: Fred Hooper <fahooper at trapo.com>
To: 'Access Developers discussion and problem solving'
<accessd at databaseadvisors.com>
Date: Friday, March 12, 2004 2:38 PM
Subject: [AccessD] Detect form height


|I have a A2K app where the users like to resize the continuous forms to
show
|more records.
|However, after they've done so the height shrinks a bit each time the form
|is opened and, eventually, they're back to showing a single record.
|
|Is there any way to detect the form's height (probably when the form
closes)
|so I can save it and use DoCmd.MoveSize to return the form to the chosen
|size?
|
|TIA
|
|--
|_______________________________________________
|AccessD mailing list
|AccessD at databaseadvisors.com
|http://databaseadvisors.com/mailman/listinfo/accessd
|Website: http://www.databaseadvisors.com





More information about the AccessD mailing list