Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2006

Tip: Looking for answers? Try searching our database.

RTF2 control printing problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
YisMan - 24 May 2006 13:31 GMT
hi eveyone
i have a RTF2 control on a form and one on a report
if i fill the reports' control with this syntax in the bottom sections'
format event:

Dim rtNotes As Object
Set rtNotes = [txNotes]
rtNotes.RTFtext = Forms("PrintOptions").[txnotes].RTFtext
SetHeight     'mr. lebans autosize function

then at printing i get a message "property read only"
interesting the report displays on screen no problem with the RTF text

Signature

Thankfully, YisMan

Stephen Lebans - 25 May 2006 00:17 GMT
That error is generated when you try to set a Property of the RTF control
before the control is fully instantiated(created). But you state that you
are calling this code from the Format event of the section containing the
control so it must be another issue.

Why are you programmatically creating an instance of the control? Why not
simply set the actual/existing RTF control's RTFtext property directly>

Signature

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

> hi eveyone
> i have a RTF2 control on a form and one on a report
[quoted text clipped - 8 lines]
> then at printing i get a message "property read only"
> interesting the report displays on screen no problem with the RTF text
YisMan - 25 May 2006 07:28 GMT
i switched to working directly:
me.[txnotes].RTFtext = Forms("PrintOptions").[txnotes].RTFtext
but i get the same message
please advise
and BTW, thanks for making your great control freely available
Signature

Thankfully, YisMan

> That error is generated when you try to set a Property of the RTF control
> before the control is fully instantiated(created). But you state that you
[quoted text clipped - 16 lines]
> > then at printing i get a message "property read only"
> > interesting the report displays on screen no problem with the RTF text
Stephen Lebans - 25 May 2006 22:34 GMT
Which event are you calling this code from?

Signature

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

>i switched to working directly:
> me.[txnotes].RTFtext = Forms("PrintOptions").[txnotes].RTFtext
[quoted text clipped - 22 lines]
>> > then at printing i get a message "property read only"
>> > interesting the report displays on screen no problem with the RTF text
YisMan - 26 May 2006 07:22 GMT
the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
Signature

Thankfully, YisMan

> Which event are you calling this code from?
>
[quoted text clipped - 24 lines]
> >> > then at printing i get a message "property read only"
> >> > interesting the report displays on screen no problem with the RTF text
Stephen Lebans - 27 May 2006 00:44 GMT
So is the RTF2 control inserted in this same section?

Signature

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

> the format event of the bottom section of a grouping.
> thanks again
[quoted text clipped - 35 lines]
>> >> > interesting the report displays on screen no problem with the RTF
>> >> > text
YisMan - 27 May 2006 22:31 GMT
Yes, and BTW the message appears for each occurence of that section as its
passed to the printer
Signature

Thankfully, YisMan

> the format event of the bottom section of a grouping.
> thanks again
[quoted text clipped - 28 lines]
> > >> > then at printing i get a message "property read only"
> > >> > interesting the report displays on screen no problem with the RTF text
Stephen Lebans - 28 May 2006 12:59 GMT
Can you copy and paste here all of the code behind your report?

Signature

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

> Yes, and BTW the message appears for each occurence of that section as its
> passed to the printer
[quoted text clipped - 38 lines]
>> > >> > interesting the report displays on screen no problem with the RTF
>> > >> > text
YisMan - 28 May 2006 13:57 GMT
NOTE: gibberish are control names in a foreign language. no problem there.
thanks again for your interest and support

Private Sub NameBottomSection_Format(Cancel As Integer, FormatCount As
Integer)
On Error Resume Next
[ìçééáéí].Visible = (Nz([éúøú îðäì], 0) < 0)

If [éúøú îðäì] = 0 Then
   [éúøú îðäì].Visible = False
   [úååéú131].Visible = False
Else
   [éúøú îðäì].Visible = True
   [úååéú131].Visible = True
End If

[äòøåú].RTFtext = Forms("äãôñú ãåçåú").[äòøåú].RTFtext
SetHeight
End Sub

Private Sub ëåúøú_òìéåðä_ùì_÷áåöä0_Format(Cancel As Integer, FormatCount As
Integer)
On Error Resume Next
[ìçééáéí].Visible = (Nz([éúøú îðäì], 0) < 0)
End Sub

Sub SetHeight()

' Height of the current RTF2 Control
Dim Height As Integer
' Max height to allow for multiple RTF2 controls
Dim MaxHeight As Integer

' Init MaxHeight
MaxHeight = 0

Height = Me.[äòøåú].Object.RTFheight
If Height > 0 Then
If Height < 32000 Then
Me.[äòøåú].Height = Height
'Me.Section(acDetail).Height = Me.RTFcontrol.Height + Me.RTFcontrol.Top
If MaxHeight > Me.[äòøåú].Height + Me.[äòøåú].Top Then MaxHeight =
Me.[äòøåú].Height + Me.[äòøåú].Top
End If
End If
' Now set the Detail Section's Height to the Maximum calculated value.
Me.Section("NameBottomSection").Height = MaxHeight
End Sub

Signature

Thankfully, YisMan

> Can you copy and paste here all of the code behind your report?
>
[quoted text clipped - 40 lines]
> >> > >> > interesting the report displays on screen no problem with the RTF
> >> > >> > text
Stephen Lebans - 28 May 2006 23:43 GMT
Comment out the call to resize the control and see if the error still
displays. I thought you could only programmatically resize the Detail
section and not the normal Grouping sections.

Signature

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

> NOTE: gibberish are control names in a foreign language. no problem there.
> thanks again for your interest and support
[quoted text clipped - 92 lines]
>> >> > >> > RTF
>> >> > >> > text
YisMan - 29 May 2006 08:36 GMT
done that. still no workie.
same error message
Signature

Thankfully, YisMan

> Comment out the call to resize the control and see if the error still
> displays. I thought you could only programmatically resize the Detail
[quoted text clipped - 96 lines]
> >> >> > >> > RTF
> >> >> > >> > text
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.