Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enlarging Subforms 1

Status
Not open for further replies.

Hmadyson

Programmer
Mar 14, 2001
202
US
I have some subforms on a form, I would like to make the form larger when there is more data in it, and keep it a standard size when there is no data in it. I know the CanGrow and CanShrink help with this when printing, but is there any way to figure out how long the form would be and change the subforms height to adjust?
 
About the only way you can reliably do this is to figure the algorithm needed for increasing the size of the form (e.g. "x records and the form needs to be 3 inches high, y records and it needs to be 4 inches, etc) and then when you open the form, count the records IN THE EXISTING parent-child path. Use your algorighm to alter the HEIGHT property of the CONTROL the subform is in. You could probably work up something that fires on the subform's CURRENT property and dynamically resize it as you move back and forth to different parent (main form) records.

Jim

Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top