The above code does NOT seem to change the size of the form. What I
want to happen, if this is possible, is for the form to expand or shrink
depending on the number of records to be displayed in the Detail section,
and for the area displaying the data to grow or shrink each time the user
selects a new value from the combo box. The number of records to be
returned after each selection from the combo box varies only from 0 to 18,
so the form only needs to expand or shrink a few inches of screen height.
Is this possible?
I have wondered about this for years, and usually just find a way around it.
But now I just want to know. Thanks. --John
This questions seems to come up a lot and I know Stephen Lebans has
some code for manipulating continuous forms on his *excellent* website
http://www.lebans.com/.
The way I would do it is to calculate the height of each form in the
continuous form, work out how many records are in the recordsource and
use docmd.move to set the placement and size of the window. Eg. each
record is 200 twips, there are 10 records but we only want to show a
maximum of 5, so set DoCmd.Move ,,,1000.
-- James