Solved

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

Posted on 2014-03-20
5
755 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses
Course of the Month6 days, 14 hours left to enroll

623 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