size a subform control to fit the subform

  • Thread starter Thread starter Martin
  • Start date Start date
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
 
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
 
and why +260?
I seek the correct algorithmus, I had this problem often, because I work
often with subform
 
Back
Top