Question about resizing RTF2 Active X control in subreport

S

sduraybito

Hi,

I can successfully turn resizing off and on in the RTF2 sample database
by removing and reinserting the resizing code:

Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
Dim Height As Integer

Height = Me.RTFcontrol.Object.RTFheight
If Height > 0 Then
If Height < 32000 Then
Me.RTFcontrol.Height = Height
End If
End If
Me.Section(acDetail).Height = Me.RTFcontrol.Height +
Me.RTFcontrol.Top

If Me.RTFcontrol.Object.RTFheight > 0 Then
If Me.RTFcontrol.Object.RTFheight < 32000 Then
Me.RTFcontrol.Height = Me.RTFcontrol.Object.RTFheight
End If
End If
End Sub

However, I cannot get this code to resize in a subreport in my
application. Would there be a reason this code doesn't work in a
subreport?

Thanks,

Peter
 
S

Stephen Lebans

Have you stepped throught he code in debug mode to see what values the
RTF2 control is returning for the Height propery?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top