Hello
> Why can't you use the CanGrow text box?
Because I have text that is blod then it be changed
to normal and Italik. And as you know the text box
can't make more than only one option on it. And that's
why I use code on Detail Event to read Field and
make option and then print it.
By the way, I try to make text Box that contain same data
and make it as white color to not views. But the problem
is the Text Box shows over the VB print code.
> set the text box's value to your concatenated string in VBA.
What is the code for this ?
So I will try it and see.
> In AXP or later, you can change the detail section's Height
> so I assume you are using A2K or earlier.
Yes, but I need it to be auto, because not all
post have many raw.
> If you're using the Print method, then no, the report is not
> aware of your need for more space.
yeah, and this is the problem
the post contain dictionary filed such as ex.
blod text HELLO then Normal & Italik text you
so samtime HELLO will be more than one word
and it be problem cause hight be not enough
Well, This code I use to print is by Leban
But I changed it to make it with many raw
Thanks
Marshall Barton - 23 Dec 2005 04:15 GMT
>> Why can't you use the CanGrow text box?
>
[quoted text clipped - 32 lines]
> Well, This code I use to print is by Leban
> But I changed it to make it with many raw
I can think of two approaches to get the effect you want.
The most obvious is to use Stephen's RTF control instead of
trying to use .Print
I tested the other idea using A97, and your current
approach. Use an unbound, blank text box, named txtGrow to
force the detail section's Height to what you need. In the
detail section's Format event, set the text box's .Height to
the calculated height to make the detail section's height
grow. You can then use the .Print method to print the text.
Unfortunately, the detail section will not reset it's new
height back to what it was originally for the next record.
To get the section Height to shrink to only the size needed
for the current record's txtGrow text box, add another
unbound, blank text box named txtShrink. Make this text box
25cm tall and set its CanShrink property to Yes. Make sure
the detail section's CanShrink property is also set to Yes.

Signature
Marsh
MVP [MS Access]
Jemsson - 23 Dec 2005 19:41 GMT
Hello
Thanks for replay. I try to understand that you wrote. I think you meand as
the foloing that I tested:
I made two empty text Box:
name: txtGrow (setting Can GROW)
name: txtShrink (Setting CAN SHRINK)
and on Detail choosed CAN SRINK
and on Detail Event wrote as folloing:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
.Height
End Sub
But I get wrong with .Height
And above din't give any effect.
I know that I didn't understand exact, if it is possible to write the code
that I just paste it on Detail.
>Stephen's RTF control instead
It pop message such as there is missing.
Maybe cause using XP.
Lots of thanks for your time
Jemsson - 24 Dec 2005 13:18 GMT
Hi agin
What is your opinion about this ide I am thinking about it:
Make empty Feild with name: aa
Put on Detail event such as this code:
------------------
Dim Number As Intiger
' Number calculate how many raw " VbCr" and give number
Number = "hello you & VbCr & how are you & VbCr & geat"
Me.aa = VbCr * Number
-------------------
Do Do you think it is possible like this code ?
If yes, so it be great
Thanks for your help
Marshall Barton - 24 Dec 2005 16:48 GMT
>Hi agin
>
[quoted text clipped - 13 lines]
>Do Do you think it is possible like this code ?
>If yes, so it be great
That's more or less what I have been saying. See my
previous reply for details.

Signature
Marsh
MVP [MS Access]
Marshall Barton - 24 Dec 2005 16:46 GMT
>Thanks for replay. I try to understand that you wrote. I think you meand as
>the foloing that I tested:
[quoted text clipped - 10 lines]
>.Height
>End Sub
You have to have some method of determining how tall you
need the detail section to be so that it can display your
text. Earlier, you said you wanted to do something like:
info = "-------" & VbCr & "--------" & VbCr & "----" &
VbCr & "------"
how many & VbCr & = info ' it shuld give 3
Me.Detail.Height = 0,598cm * 3
What I am saying now is that you can get that effect by
using:
info = "-------" & vbCrLf & "--------" & vbCrLf & "----" &
vbCrLf & "------"
Number = Len(info) - _
Len(Replace(info, vbCrLf ,"")/Len(vbCrLF) + 1
Me.txtGrow.Height = 0,598cm * Number
BUT, how do you know that none of the lines between newlines
wiil fit in the report width? If any line wraps to the next
line, then there will be a newline that you didn't count.
If you have considered this problem and will not run into
this issue, then I think you should be be able to do what
you want.
>I know that I didn't understand exact, if it is possible to write the code
>that I just paste it on Detail.
No, I can't write the code. You have not explained it
clearly enough for that. Besides, It's your project, we can
help you, but it's unreasonable to ask us to do the work
too.
>>Stephen's RTF control instead
> It pop message such as there is missing.
> Maybe cause using XP.
I doubt that. You probably have not understood how to set
it up and use it correctly.

Signature
Marsh
MVP [MS Access]
Jemsson - 25 Dec 2005 06:25 GMT
Hello
Thank you very much for the code
Jesus Bless