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!

Autosizing rectangle

Status
Not open for further replies.

nq

IS-IT--Management
Apr 1, 2002
102
0
0
AU
I have a report that prints a major topic heading followed by a group of data spread over several lines. There may be several groups of data pertaining to the major heading. To differentiate between individual groups, I have enclosed each group by a rectangle.

One of the fields in the group of data is a "comments" field. This field has the "Can Grow" property assigned as "Yes". If a "comment" field grows, it expands correctly, displaying multiple lines.

Problem: As the "comments" field grows, the size of the rectangle does not and some fields are printed outside of the rectangle.

Is there a way to bind the rectagle to a growing or shrinking "comments" field?
 
Have you thought about setting the border properties of the text box rather than using a rectangle?
 
search these (tek-tips) fora. there are several threads discussing the technique. making a line or rectangle span an area of a report is essientially the same process, so look for threads inclucing both terms with .length and/or .height ...




MichaelRed


 
BarneyOwl. No, the rectangle is used to surround several boxes - hence the problem.

Thanks for the clue MichaelRed. I did search before asking - obviously the wrong key words. I used something similar to the code below. I had to change the layout so it's not an ideal solution but it works. I'll refine it later.

Code:
 Me.Box.Height = Me.Comments.Height + Offset
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top