Solved

adjust height of text box based on height of another text box.

Posted on 2014-03-20
5
699 Views
Last Modified: 2014-03-21
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
0
Comment
Question by:Nemetona
  • 3
5 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39942989
which event are you using to set the height of the first box?
0
 

Author Comment

by:Nemetona
ID: 39943044
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.
0
 
LVL 7

Accepted Solution

by:
COACHMAN99 earned 500 total points
ID: 39943058
0
 
LVL 4

Expert Comment

by:frankd
ID: 39943060
Try setting the fontsize the same in both text boxes.
0
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39943065
I don't think fonts will help. need to ascertain height of field2 and set field1 on rendering
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now