Setting the RTF2 control Properties...

S

Stephen Lebans

Use the SetFont prop.

Dim x As RTF2
Dim fnt As New StdFont

Set x = Me!rchtxtCalendar.Object
With fnt
.Name = "arial"
.Size = 14
.Italic = False
.Bold = False
.Strikethrough = False
.Underline = False
End With

set x.Font = fnt


--

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

Michael Gould

In Access 2003? Where would you assign this code set - in a class module?
in one of the control's event handlers?

Nice to know you do look after your product.

Mike
 
S

Stephen Lebans

The sample code can be placed behind a control in the Form's class
module.

--

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

Michael Gould

Cool, I will try it...by the way - I found a workaround for the bug that
discards the first character entered in the control.

I put this code in the On Enter event handler for the control at the form
level:

Private Sub RTF2Ctrl_Enter() ' or whatever the control is named on the
form....

If Len(RTF2Ctrl.Value) = 0 Then ' we don't want to wipe existing data, do
we?

RTF2Ctrl.Value = " " ' sets the value of the control to a space ( This
bit might be overkill)
RTF2Ctrl.Value = "" ' erases the contents.

End If

End Sub

Only more testing will determine if it is consistent as it looks.

Thank you again for putting this out - well within my budget!

Cheers!

Mike
 
S

Stephen Lebans

That bug is documented on my site and the FMS site as well. The solution
is to Dirty the record on the Form's Current event.
:)
--
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