size a subform control to fit the subform

M

Martin

Hi,
I am trying to write code, which sizes the subform control of a main form
so, that it can show all control of the subform.

I write

ctrl_Subform.width = ctrl_subform.form.width

but the horiz. scrollbar is displayed.

Is there any gut algorithmus?

Thanks
Martin
 
C

Chris L via AccessMonster.com

I think you have to allow for the sub forms Vertical scroll bar, either
remove this or add a bit on to take account of it:-

ctrl_Subform.width = ctrl_subform.form.width+260

hth

Chris
 
M

Martin

and why +260?
I seek the correct algorithmus, I had this problem often, because I work
often with subform
 
Top