Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-28-2012, 12:31 AM   #1
perlfan
Newly Registered User
 
Join Date: May 2009
Location: Stuttgart, Germany
Posts: 169
Thanks: 137
Thanked 3 Times in 3 Posts
perlfan is on a distinguished road
Height of page header depending on text field height?!

Hi there,

with VBA I would like to dynamically adapt the height of a report's page header depending on the height of a certain text field, which is expandable. The problem is, even though the field is expandable, I always get the same value for textfieldXY.height, no matter how high it is in report view. So I guess that the height value doesn't change depending on the displayed contents. In the end, it's important for me that the detail area below is directly connected to this text field, without any useless space in between.
Can somebody help?? Thanks a lot in advance!! FRANK

perlfan is offline   Reply With Quote
Old 06-28-2012, 03:58 AM   #2
vbaInet
AWF VIP
 
Join Date: Jan 2010
Location: U.K.
Posts: 26,374
Thanks: 0
Thanked 2,423 Times in 2,389 Posts
vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all
Re: Height of page header depending on text field height?!

Look into using a subreport and set the subreport's Can Grow and Can Shrink properties to Yes, as well as setting the same properties for the section in which the subreport was placed.
vbaInet is offline   Reply With Quote
The Following User Says Thank You to vbaInet For This Useful Post:
perlfan (06-28-2012)
Old 06-28-2012, 05:54 AM   #3
perlfan
Newly Registered User
 
Join Date: May 2009
Location: Stuttgart, Germany
Posts: 169
Thanks: 137
Thanked 3 Times in 3 Posts
perlfan is on a distinguished road
Re: Height of page header depending on text field height?!

Currently, the text field is placed in the page header. It's plain text that goes into the text field. So you are saying that I could fill the subreport with my text (text depends on variables, so it's not always the same) and the subreport would dynamically expand and collapse, and so would the page header because it contains the subreport?`Thanks for clarification. Never worked with subreports, so I would rather want to stick to simple text fields. Regards, Frank

perlfan is offline   Reply With Quote
Old 06-28-2012, 06:27 AM   #4
vbaInet
AWF VIP
 
Join Date: Jan 2010
Location: U.K.
Posts: 26,374
Thanks: 0
Thanked 2,423 Times in 2,389 Posts
vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all
Re: Height of page header depending on text field height?!

If the textbox is in a section that has the Can Grow and Can Shrink properties, then the section will expand and contract if those properties were set. Otherwise, you will need a subreport.

Subreports are quite handy so sooner or later you will need to use them.
vbaInet is offline   Reply With Quote
The Following User Says Thank You to vbaInet For This Useful Post:
perlfan (06-28-2012)
Old 06-28-2012, 08:10 AM   #5
perlfan
Newly Registered User
 
Join Date: May 2009
Location: Stuttgart, Germany
Posts: 169
Thanks: 137
Thanked 3 Times in 3 Posts
perlfan is on a distinguished road
Re: Height of page header depending on text field height?!

Thanks again for your input. As this report has only one page, I decided to simply use the enlargeable report header instead of the page header which cannot dynamically grow/shrink. FRANK
perlfan is offline   Reply With Quote
Old 06-28-2012, 08:12 AM   #6
vbaInet
AWF VIP
 
Join Date: Jan 2010
Location: U.K.
Posts: 26,374
Thanks: 0
Thanked 2,423 Times in 2,389 Posts
vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all vbaInet is a name known to all
Re: Height of page header depending on text field height?!

Good job. You're welcome!

vbaInet is offline   Reply With Quote
The Following User Says Thank You to vbaInet For This Useful Post:
perlfan (06-28-2012)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
grow label height with textbox height.... wiklendt Reports 7 05-05-2013 12:52 PM
Page Header Height = 22" Problem in MS Access 22 psimpson Reports 5 06-09-2011 08:20 AM
Make Popup Form (Dialog)'s height as same as Window/Montior/Screen Height accessman2 Forms 1 05-07-2008 07:22 AM
Form Header Height Problem llkhoutx Forms 4 06-02-2004 03:58 PM
difference between height and height ? for charts lambuhere1 Modules & VBA 2 11-27-2001 05:45 AM




All times are GMT -8. The time now is 10:41 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World