Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Height of Report Sections that "CanGrow"

Status
Not open for further replies.

srmclean

Technical User
Jun 23, 2003
23
AU

I have a detail that is 0.5cm tall which accounts for most of my lines of data. However now and again one of the fields that "CanGrow" does.

Basically I want to know how to find out the actual Me.Detail.Height because when I use :

Debug.Print Me.Detail.Height

to check this value it never seens to change, no matter how much my field grows.

----------------
Shaun McLean
 
Where are you checking the height from?

try me.Detail.Height.
 
Not sure if this helps in anyway, but I found this to be interesting. I put a textbox in the detail section and set the cangrow property of the textbox to true. Then in the on print event (it can not be in the format event because the format event is actually a "before" format event), I printed out the size of the text box and the size of the detail. As the text box grows I get different numbers, but, as you said, the detail returns the default height value. So there is something going on I do not understand either. But bottom line you can get the height of the controls if that helps.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
'The text box returns the correct height.
MsgBox Me.txtBoxGrow.Height & " " & Me.Detail.Height

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top