Help with Lebans (FMC) RichText control PLEASE!!!

G

Guest

I am using Access 2000. I have a form and a correponding report...both have
a richtext activeX (Lebans FMC V1.8). When I run my report, the first page is
always blank. I am using the code that came with the control example, which
does the same thing:


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

Dim Height As Integer

Height = Me.RTFcontrol.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.RTFheight > 0 Then
If Me.RTFcontrol.RTFheight < 32000 Then
Me.RTFcontrol.Height = Me.RTFcontrol.RTFheight
End If
End If

Any help would be greatly appreciated!

Thanks,
Mike Robinson
 
K

Ken Snell [MVP]

Your code appears to be for a section named Detail1. The code sets the
height of the section named Detail. These are not the same ....
 
K

Ken Snell [MVP]

I have used the exact code that you posted, and it has worked well for me.
So let's explore the setup of your report to see what is going on here.

Describe the report, the sections and controls, and the data so that we can
identify what might be happening.
 
G

Guest

Ken,

Found IT. I had a text box and some lines in the detail section where the
RTF resides. Not sure why this should matter...but it did.

There is one more problem if you have time. If the memo field bound to the
RTF requires a 2nd page, it splits a line of text vertically. and continues
on the next page. The top half of the text line is on one page, the bottom
half is on the next. Is this a sizing problem?

Anyway, my MAJOR problem was the blank page.
Thanks for getting me OUTSIDE the box on your last post.

Thanks,

Mike Robinson
 
K

Ken Snell [MVP]

Stephen's RTF2 control does not automatically split across pages, nor does
he recommend using it htat way. You would have to write programming code to
test the RTF2 control for its length, and then break the page via code.
There is an example that Stephen posted on his web page that he received
from a "reader" that is one way to approach this.

However, again from personal experience, it is better if you use the RTF2
control without splitting across pages. If you're going to need multipage
capability, consider using two RTF2 controls, one on each page, and split
your string into the two RTF2 controls' control sources.
 

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