views:

132

answers:

1

Hi,

I have a subform on a form and its default view is set to 'continuous form'. How do I make the form, and thus its parent form, expand its height automatically to accommodate all applicable records.

Thanks in advance to anyone who can help

Noel

A: 

That would be unsafe as it could lead to a form larger than the screen. You can set the height to the largest suitable for the screen, or you can use VBA to set the size of the parent form (DoCmd.MoveSize) and the child form. SizeToFit is only available in design view.

Remou
Thanks for the reply Remou. I'm trying to avoid having the scroll bars on the subform and would prefer them to be on the parent form, if that makes sense. I do not want the form to be bigger than the screen, but feel it would be easier for the user, in this instance, if the subform, and parents, height would expand automatically. I seem to be limited as to what height i can set the subform to by its bounding box in design view. Hope that makes sense!
glinch
I am not sure why you want to do this in an unusual and difficult way. People are familiar with scrolling subforms, I reckon. The bounding box is the subform control, which contains the subform. If you make the subform control very long, the parent form will also grow and a scroll bar will appear on the parent form.
Remou
OK Remou, I shall go with your advice thanks for the help
glinch