Resize Textbox In Code upon Format

CadMonkey

Misplaced But Useful
Local time
Today, 23:51
Joined
May 19, 2004
Messages
47
Is there any way of resizing a text box from code so that you can handle the height of a textbox for different values?

I.E. (But this doesn't change the height at all it seems!!)

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)


if [text75] = "HellO" then
[Text75].height = 4
else
[Text75].height = 2
end if

End Sub



Thankyou in advance if you have any ideas!!

NB This is different to CanGrow etc.
 
In code, the sizes are measured in "twips". 1440 twips = 1 inch so use that formula for your sizing.
 
RichO said:
In code, the sizes are measured in "twips". 1440 twips = 1 inch so use that formula for your sizing.

Thankyou RichO but even considering this, the code itself doesn't work- the resultant size of text boxes remain the same.

Anyone else any ideas??
 
Rich said:
Why can't you just set the CanGrow to yes?

Hands up, I'm cheating... the story goes as this.

I couldn't work out this union query stuff to show all headers and items even headers where no items are stored uder (if you catch my drift).

Therefore upon viewing report I crated a null record under each header so that it would show then conditionallyformatted it as white text. This worked a beaut. But leaves a big hairy (blank really) gap between headers then. SO I thought if i Physically handle and force the height of the text boxes to be smaller or format of detail section in report I could get rid of this space.
 

Users who are viewing this thread

Back
Top Bottom