VBA Text (1 Viewer)

kitty77

Registered User.
Local time
Yesterday, 23:07
Joined
May 27, 2019
Messages
710
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
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,453
Hi. Where is the text going to be displayed?
 

kitty77

Registered User.
Local time
Yesterday, 23:07
Joined
May 27, 2019
Messages
710
On a report
 

kitty77

Registered User.
Local time
Yesterday, 23:07
Joined
May 27, 2019
Messages
710
Where do I set it to rich? Can you give me an example?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,453
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
Yesterday, 23:07
Joined
May 27, 2019
Messages
710
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
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,453
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: 166

kitty77

Registered User.
Local time
Yesterday, 23:07
Joined
May 27, 2019
Messages
710
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?
 

kitty77

Registered User.
Local time
Yesterday, 23:07
Joined
May 27, 2019
Messages
710
Looks like it only works on unbound fields?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,453
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
Yesterday, 23:07
Joined
May 27, 2019
Messages
710
I don't see anything in the table design where you change text format?
 

Users who are viewing this thread

Top Bottom