Width property

G

gr

Hello!
In a report i'm making visible or invisible some textboxes
depending on certain criteria. If all the textboxes were
shown the report will be 2 pages. But if many txtboxes are
hidden then the report should be of one page (second page
is empty).
In order to accomplish this, I'm setting all invisible
textboxes (label and textbox itself) Left property to 0.
All lines width is set to the last visible textbox Width +
Left.
At the end i'm setting the Report width property like this
Debug.Print Me.Width '(two pages width)
Me.Width = Me!LineHeader.Width '(one page width)
Debug.Print Me.Width ' (new width - one page - )

the debug.print statements show that actually the width is
changed but the report still is opened with the second
page blank.

Everything is coded on the OnOpen event.
Can someone help?

thx.
 
J

Jeff Boyce

Visible or not, it's still there. Have you looked into the CanGrow and
CanShrink properties?
 
Top