Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set report field height to match another field value

Status
Not open for further replies.

dkape

MIS
Mar 22, 2001
17
0
0
US
Hello,

I was wondering if it was possible to set the height property for a text box on a report to be equal to the height of another field (text box).

Such that if one text box grows due to the size of the data in it the other text boxes for that same record will grow to match it.

thanks
 
Have you tried, in the onformat event of the detail section of the form (assuming fields are in the detail section)

FieldOne.Height = Fieldtwo.Height

?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
This is not possible in Access reports through ver 2003. The "grown" height is only available in the On Print event of the section. You can't set the height of a control in the On Print event.

The generally accepted solution is to remove all borders and use code to draw rectangles using the Line method. You can grab the height of the tallest control in the On Print event and use code like:
Code:
  Me.Line (Me.txtSmaller.Left, Me.txtSmallerTop)-Step(Me.txtSmaller.Width, Me.txtTaller.Height) , , B

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top