Question : Detect if a text box grows - Access Report

I have a unique report situation where I need some close formatting between the vertical layout of two text boxes.  In order to make the layout as tight as we need, I had to slightly overlap the text boxes.  (See the Illustration.)

Here is problem:  The upper text box needs to grow in some cases.  Since the text boxes are overlapping, the lower text box will never relocate during the grow event of the upper text box.  Is there a way to overcome this?  Is there a way in visual basic, where I could detect if the upper text box grew and then I could relocate the lower text box as needed.

(The upper text box is called "JobName" and the lower text box is called "Estimate".)

Answer : Detect if a text box grows - Access Report

shrimpfork,

AFAIK, there is no way to detect how much a textbox will grow.
If you try to use code to detect the textbox height, it will always display the height from the propertybox.

The issue is that you design requires that one texbox sits on top of another.
Most of the time, in a report, the textboxes are side by side.

Would you consider re-designing your report if this was the only way to avoid this issue?

The only way around this would be to figure out the maximum height of each box, then set that height as the height of the controls.
Then set the CanGrow and CanShrink properties of those controls to: No
(In other words, make the boxes as big as they will ever need to be, and leave them that way)

JeffCoachman
Random Solutions  
 
programming4us programming4us