You need to do a function OnPrint, because that is when the new height for
the textbox is computed, I was experiencing the same problem not too long
ago...you need to manually draw the boxes using the line functions. This
will work if you have a main report or subreports embedded in a main report.
intMaxSize = Me.Detail.Controls.count - 1
For intI=0 to intMaxSize
Set propertiesStorer(intI) = Me.Detail.Controls.Item(intI)
Next intI
// For loop of leftStorer = propertiesStorer(intI).Left
// For loop of heightStorer = propertiesStorer(intI).Height
// For loop to find the maxHeight
// For loop to Draw lines such that Me.Line (leftStorer(intI),0) -
(leftStorer(intI),maxHeight)
// Me.Line (Me.Width,0) - (Me.Width, maxHeight) to draw the final right
outside edge
// Me.Line (0, maxHeight) - (Me.Width, maxHeight) to draw lines to separate
the records
Hope this helps.
--
Travis Cornwell
Computer Science Coop
REM Services Inc.
tw******@ncsu.edu
"Phil Stanton" <ph**@stantonfamily.co.uk> wrote in message
news:3f*********************@mercury.nildram.net.. .
I am trying to create a text box in Word the same height as one on a
report and then fill it with text.
I can "read" the position of the text box from the report OK and create a
text box in Word with the correct position, but it's size is identical to
the size of the "ungrown" text box on the report. I need to create the
text box in Word the same size as the grown text box on the report.
So, in Design view the report has a text box about 1cm (570 twips) high.
It's properties are CanGrow yes and CanShrink yes. It is bound to a memo
field. Sometimes the box is big enough to hold all the data, but more
frequently it will have to grow to up to 10cms high to accommodate the
data..
I need to create the text box in Word the same size as the report textbox
in print or preview mode ie from 1cm to 10cms high in order to hold the data.
I have tried using OnFormat MyReport.TextHeight(MyMemo) but that only
gives the original textbox height.
Can anyone help
Thanks
Phil