Avatar of Mik Mak
Mik Mak
 asked on

Rich text code for bold ignored on report

In Access 13, I want to use bold text for a section of a control - but the bold codes seen below are simply ignored - italics works fine - very strange. The control is of course set to Rich text :)

="Part 1 <i><b> Bold and italics </b></i> Part 2"
Microsoft Access

Avatar of undefined
Last Comment
Mik Mak

8/22/2022 - Mon
Anders Ebro (Microsoft MVP)

Thats because its not <b>
The easiest way to figure out the syntax is to create a form, with 2 textboxes.
Set textbox1 to Rich Text.

Then set textbox2 to plain text, and set its controlsource "=Textbox1"

Then do the formatting using the GUI in textbox 1, and see how the syntax looks in textbox2.

It comes out as:
<div>Part 1 <strong><em>Bold Italic</em></strong> Part 2</div>

Open in new window

Mik Mak

ASKER
Thank you for your input - but that sounds strange - every link I have found have mentioned either <b> or <strong>
Daniel Pineault

You have to know that Microsoft's implementation of RTF is very weak and does not respect HTML standards.  You are always best to do as Anders suggests to the the 'format' that Microsoft prescribes to.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Anders Ebro (Microsoft MVP)

While it might look like HTML and has similarities to HTML, its not exactly the same. (Yes, it would probably have made more sense if it was the same syntax...). But don't kill the messenger :)
Mik Mak

ASKER
I understand - just puzzled that every link I can find related to this only mentions either <b> or <strong> - so the correct code must be super secret - or individual per installation...
Anders Ebro (Microsoft MVP)

Do you have an example of such a link? Does it specifically mention Access?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Mik Mak

ASKER
Anders Ebro (Microsoft MVP)

I looked at that link. Nowhere did I find <b> mentioned.
Mik Mak

ASKER
no, that link only mentions <strong>  which doesn't work either :)
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Mik Mak

ASKER
Anders Ebro (Microsoft MVP)

Either way, try the method I mentioned in my original post.
Mik Mak

ASKER
But thats on a form - and <div><strong>bold letters</strong></div> as it shows, works fine there - but not on the report :) - but <i> do
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Daniel Pineault

What build are you running?

When I did a few quick tests, it all seems to work in both Forms and Reports.

Also the tags that MS seems to us are

Bold -> <strong></strong>
Italic -> <em></em>
Underline -><u></u>
Highlight -><font style="BACKGROUND-COLOR:#FFFF00">d</font>
...
Jeffrey Coachman

Do you need this formatting in this same "position" in the field, and in every record?

If you just need it in a few records,..you can set the bold and Italic in the table/datasheet view, ...then it will be the same way in the report.
Bold ItalicBold Italic1
JeffCoachman
Anders Ebro (Microsoft MVP)

Try looking at this sample database. Does the report properly bold and italicize the words?
RichTextTest.zip
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Mik Mak

ASKER
Hmm, thank you Anders - that works perfectly... - even though the database with the problem is running on 2013/2016 - it's still an mdb file - not accdb -maybe the problem lies here, even though the formatting has nothing to do with any data-structure, as it's a fixed text field
Daniel Pineault

I just tested using an mdb and it all worked fine for me.
Mik Mak

ASKER
So Anders accdb worked fine - but my mdb did'nt - so i tried to convert it to accdb - no change. Then I tried to copy one field from Anders file to the problematic report - and that worked fine... - it turns out the "super special" font the customer is using in the reports don't support bold - goddammit :) Sorry about that guys, but thank you for all the inputs !
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Mik Mak

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Daniel Pineault

Good catch.  I too would have never of thought of that.
Anders Ebro (Microsoft MVP)

Yes, nice catch. I would not have thought of that either.
Mik Mak

ASKER
Yes, pretty strange - have a nice evening (as it is here in Denmark :))
Your help has saved me hundreds of hours of internet surfing.
fblack61