Nemetona
asked on
adjust height of text box based on height of another text box.
I am using MS Access 2003 to genereate a report. The report has a sub-report on which I have two fields. The first field contains a number and the second some text. In those cases where the text runs onto a second line I would like to adjust the height of the first text box to match.
I tried adding firsttext.height = secondtext.height in the Detail Format section of the subreport but it does not make a differerence.
I then checked the Detail Print section and at that point the height of the secondtext.height registers the fact that the text box has grown but I cannot adjust the height of the firsttext since the printing has already started.
Does anyone have a solution to this problem. I have attached a screen shot which shows how the report currently looks.
change-height.jpg
I tried adding firsttext.height = secondtext.height in the Detail Format section of the subreport but it does not make a differerence.
I then checked the Detail Print section and at that point the height of the secondtext.height registers the fact that the text box has grown but I cannot adjust the height of the firsttext since the printing has already started.
Does anyone have a solution to this problem. I have attached a screen shot which shows how the report currently looks.
change-height.jpg
which event are you using to set the height of the first box?
ASKER
I have the height of the firstbox set to the default, it only changes when the secondbox increases in height and that occurs, currently, in the format detail event.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try setting the fontsize the same in both text boxes.
I don't think fonts will help. need to ascertain height of field2 and set field1 on rendering