Same Height

  • Thread starter Thread starter CJ
  • Start date Start date
C

CJ

Hi Groupies

All of my text boxes in the detail section are set to Can Grow. My problem
is that if one of the boxes needs to grow, I need the other text boxes to
grow to the same size. The box that usually needs to grow is called strName,
so I would like all of the other boxes to be the same height as strName when
the detail prints.

I am testing this with one of the other boxes and at the moment, I have the
following code, but nothing is changing:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Me.Package.Height = Me.strName.Height

End Sub

Some insight into the problem would be greatly appreciated.
 
As you may have found out, this won't work. The grown height of the text box
can't be determined until the On Print event. At that point it is too late to
set the height of other controls.

The common solution is to remove the borders from all text boxes and use
code in the On Print event to find the tallest text box. Then use the Line
method of the report to draw rectangles around all text boxes.

This question get answered several times per month so you should be able to
google
Access reports Me.Line On Print Hookom
If you don't find some code, let us know.
 
CJ said:
All of my text boxes in the detail section are set to Can Grow. My problem
is that if one of the boxes needs to grow, I need the other text boxes to
grow to the same size. The box that usually needs to grow is called strName,
so I would like all of the other boxes to be the same height as strName when
the detail prints.

I am testing this with one of the other boxes and at the moment, I have the
following code, but nothing is changing:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Me.Package.Height = Me.strName.Height

End Sub

Some insight into the problem would be greatly appreciated.


Check Print Lines at www.lebans.com
 
Back
Top