Leban RTF Control and MS text box

G

Guest

Hi Steve

I downloaded and configured your ActiveX rtf control. Works great! One question: I am needing to capture the text from a number of ActiveX controls and insert them into a number of text box controls in the detail section of the report. I have the ActiveX rtf controls in the report header and am using several "Me![<textcontrolname>] = Me![<ActiveXcontrolname>].Text" lines of code in the format event of the detail section of the report. It's not working with erro
"Object doesn't support this property or method

Does your ActiveX control not allow me to capture the text? I saw some sample code on your website for resizing rtf control sizes but the text in the reports I use this control on always vary in the amount of text printed so I need to use the CanGrow property of the text control and just feed it the text.

Any suggestions would be greatly appreciated. Thank
Phil K.
 
S

Stephen Lebans

Phile I really do not understand what you are trying to accomplish here.
Why would you take RTF text out of the control to display it within a
standard Access TextBox control that cannot display RTF? Why even use an
RTF control?

The RTF2 control does support Autosizing to simulate CanGrow/Shrink as
per the code you mentioned.

If you still want to get the Text only from the code you need to use the
Selxxx props. Here's an example:

Me.NameofyourRTFcontrol.object.SelStart = 0
Me.NameofyourRTFcontrol.object.SelLen = 65000 ' any number guaranteed to
be larger than the max characters in the control.
me.NameofyourTextBoxcontrol.value =
Me.NameofyourRTFcontrol.object.SelText

--

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


Phil K said:
Hi Steve:

I downloaded and configured your ActiveX rtf control. Works great! One
question: I am needing to capture the text from a number of ActiveX
controls and insert them into a number of text box controls in the
detail section of the report. I have the ActiveX rtf controls in the
report header and am using several "Me![<textcontrolname>] =
Me![ said:
"Object doesn't support this property or method"

Does your ActiveX control not allow me to capture the text? I saw some
sample code on your website for resizing rtf control sizes but the text
in the reports I use this control on always vary in the amount of text
printed so I need to use the CanGrow property of the text control and
just feed it the text.
 
G

Guest

Thanks for the quick reply Steve. In answer to your question

The code that simulates the CanGrow property does not quite work in the way I need it to. When the rtf control "grows" it does not move objects (lines, labels, other rtf controls) below it down the page. Instead the rtf control writes text over top of the controls. There are about 8 of these rtf controls in the particular report that I am working on so the mismatches between text, lines and labels starts to get pretty weird after a couple of controls have printed. The reason I am doing all of this in the first place is that MS rtf controls do not have a functioning CanGrow property. The reports I am working on are clones of Government documents and must have the look of the original so I can't just size the rtf control to what it could need at a maximum as this would make the report look incorrect

I am going to attempt putting each rtf control in its own footer band on the report and see if that helps. If it does not, I will try using the Seltext code you sent

Again, thanks for your time on this. I'll let you know how it turns out

Phil K.
 

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