RTF2 control printing problem

Y

YisMan

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
 
S

Stephen Lebans

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>

--

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

YisMan

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
--
Thankfully, YisMan


Stephen Lebans said:
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>

--

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


YisMan said:
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
 
S

Stephen Lebans

Which event are you calling this code from?

--

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


YisMan said:
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
--
Thankfully, YisMan


Stephen Lebans said:
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>

--

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


YisMan said:
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
 
Y

YisMan

the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
--
Thankfully, YisMan


Stephen Lebans said:
Which event are you calling this code from?

--

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


YisMan said:
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
--
Thankfully, YisMan


Stephen Lebans said:
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>

--

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
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
 
S

Stephen Lebans

So is the RTF2 control inserted in this same section?

--

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


YisMan said:
the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
--
Thankfully, YisMan


Stephen Lebans said:
Which event are you calling this code from?

--

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


YisMan said:
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
--
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
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>

--

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
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
 
Y

YisMan

Yes, and BTW the message appears for each occurence of that section as its
passed to the printer
--
Thankfully, YisMan


YisMan said:
the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
--
Thankfully, YisMan


Stephen Lebans said:
Which event are you calling this code from?

--

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


YisMan said:
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
--
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
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>

--

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
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
 
S

Stephen Lebans

Can you copy and paste here all of the code behind your report?

--

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


YisMan said:
Yes, and BTW the message appears for each occurence of that section as its
passed to the printer
--
Thankfully, YisMan


YisMan said:
the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
--
Thankfully, YisMan


Stephen Lebans said:
Which event are you calling this code from?

--

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
but i get the same message
please advise
and BTW, thanks for making your great control freely available
--
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
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>

--

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
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
 
Y

YisMan

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


--
Thankfully, YisMan


Stephen Lebans said:
Can you copy and paste here all of the code behind your report?

--

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


YisMan said:
Yes, and BTW the message appears for each occurence of that section as its
passed to the printer
--
Thankfully, YisMan


YisMan said:
the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
--
Thankfully, YisMan


:

Which event are you calling this code from?

--

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
but i get the same message
please advise
and BTW, thanks for making your great control freely available
--
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
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>

--

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
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
 
S

Stephen Lebans

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.

--

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


YisMan said:
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


--
Thankfully, YisMan


Stephen Lebans said:
Can you copy and paste here all of the code behind your report?

--

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


YisMan said:
Yes, and BTW the message appears for each occurence of that section as
its
passed to the printer
--
Thankfully, YisMan


:

the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
--
Thankfully, YisMan


:

Which event are you calling this code from?

--

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
but i get the same message
please advise
and BTW, thanks for making your great control freely available
--
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
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>

--

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
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
 
Y

YisMan

done that. still no workie.
same error message
--
Thankfully, YisMan


Stephen Lebans said:
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.

--

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


YisMan said:
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


--
Thankfully, YisMan


Stephen Lebans said:
Can you copy and paste here all of the code behind your report?

--

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
--
Thankfully, YisMan


:

the format event of the bottom section of a grouping.
thanks again
very nice of you to be supplying support as well
--
Thankfully, YisMan


:

Which event are you calling this code from?

--

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
but i get the same message
please advise
and BTW, thanks for making your great control freely available
--
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
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>

--

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
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
 

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