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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set "Can Grow"/"Can Shrink"/"Size to Fit" o

Status
Not open for further replies.

as0125

Technical User
Jun 3, 2004
70
0
0
US

Hello all,

I'm currently using Leban's RTF2 ActiveX control on my forms, which works great (it allows text formatting). Now I need to "tweak" my reports to accommodate the formatted field. My old reports are designed so that the field in question has:
Can Grow = Yes
Can Shrink = Yes
How can I apply the same to the RTF control? I've tried doing it via VBA:
Me.RTFname.SizeToFit
But this doesn't work for me either.

Anyone with suggestions please?
 
Have you tried
Me.RTFname.Cangrow = true

Hope this helps
Hymn
 

Hi Hymn,

Thanks for the suggestion. Yes, I've tried that and receive this error message:

"Object doesn't support this property or method"

Anything else I can try? I'd really love to get this feature to work.
 
this the code he uses
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

Hope this helps
Hymn
 


Thanks a lot! It works great now!
 
Its a pleasure

Hope this helps
Hymn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top