by Earl Brightup email@example.com
This six-part series describes a method of dynamically optimizing the vertical size of a Continuous Form to fit the number of rows of data to be displayed—on any screen size and resolution.
- Introduction - Continuous Forms
- Vertical Sizing by Hand Adjustment (this post)
- Vertical Sizing by Calculations
- Vertical Positioning
- Sample Access Database Demonstration
- Adapting Dynamic Sizing and Positioning Code to Your Continuous Form
You can find a sample with complete documentation here: http://www.rogersaccesslibrary.com/forum/topic600_post618.html
II. Vertical Sizing by Hand Adjustment
In case the reader is not familiar with hand-adjusting the vertical size of a Continuous Form, here is a procedure for it. This method will cause the form to open in production mode to a fixed vertical size, the same size every time regardless of the number of rows of data.
In Design view, drag the bottom of the form down to the size you would like to see it when it opens in production mode. Then click File | Save | File | Close. The final File | Close can be replaced with a close via the big X in the upper right corner of the form. When the form opens in production mode, it will open to your preset size. With records displayed, you can see how close to your desired size the form is set. If not satisfactory, the form can be opened again in Design view and the procedure repeated.
The inconvenience of this method is that unless you are prescient, the size of the Detail section may not quite display a full integer number of records or you may have oversized it and have empty space. Hand-adjustment is just a way to get close to a desired vertical size.
Next time: Vertical Sizing by Calculations