Lebans RTF2 control...

S

SF

Hi,

I used Lebans RTF2 control in my report. However, my report contain two RTF2
control instead of one. The code below is alomost perfect except that if the
height of second RTF2 control is heigher than control 1, It just cut of the
rest of the text. I am having a hard time, as a newbie, to modify the code
to address the case state above. Could someone advice?


Private Sub Detail_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
Me.RTFcontrol1.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
Me.RTFcontrol1.Height = Me.RTFcontrol.Object.RTFheight
End If
End If

End Sub

SF
 
S

Stephen Lebans

Well if you have two RTF controls then you need to work with TWO Height
variables.
Height1 = Height = Me.RTFcontrol.Object.RTFheight
Height2 = Me.RTFcontrolTheSecondControlsName.Object.RTFheight

--

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