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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top