Solved

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

Posted on 2014-03-20
5
707 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

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…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

863 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

25 Experts available now in Live!

Get 1:1 Help Now