VBA Text (1 Viewer)

kitty77

Registered User.
Local time
Today, 05:03
Joined
May 27, 2019
Messages
693
Is it possible to change the font, bold, etc... in vba?

[Field1] = "Apple" & vbCrLf & "Blue" & vbCrLf & "Red"

How can I make "Blue" bold or Italic only?

Thanks...
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:03
Joined
Oct 29, 2018
Messages
21,322
Hi. Where is the text going to be displayed?
 

kitty77

Registered User.
Local time
Today, 05:03
Joined
May 27, 2019
Messages
693
On a report
 

kitty77

Registered User.
Local time
Today, 05:03
Joined
May 27, 2019
Messages
693
Where do I set it to rich? Can you give me an example?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:03
Joined
Oct 29, 2018
Messages
21,322
Where do I set it to rich? Can you give me an example?

In the design view of the report, select the textbox and then look in the properties panel for the text format property.
 

kitty77

Registered User.
Local time
Today, 05:03
Joined
May 27, 2019
Messages
693
When I change the settings to rich, I get an error.

The setting you entered isn't valid for the property.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:03
Joined
Oct 29, 2018
Messages
21,322
When I change the settings to rich, I get an error.

The setting you entered isn't valid for the property.
Hi. Can you post a screenshot of what you're changing? Thanks.


PS. It should look something like this:


 

Attachments

  • rtf.png
    rtf.png
    17.3 KB · Views: 164

kitty77

Registered User.
Local time
Today, 05:03
Joined
May 27, 2019
Messages
693
Yes, it is the same as yours. Same error on a report or form.
Also, tried it on different text fields. I get the same error?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:03
Joined
Oct 29, 2018
Messages
21,322
Looks like it only works on unbound fields?
Okay, if it's for a bound field, you'll have to go to the table design first and change the text format for the field to Rich Text as well.
 

kitty77

Registered User.
Local time
Today, 05:03
Joined
May 27, 2019
Messages
693
I don't see anything in the table design where you change text format?
 

Users who are viewing this thread

Top Bottom