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"
="Part 1 <i><b> Bold and italics </b></i> Part 2"
ASKER
Thank you for your input - but that sounds strange - every link I have found have mentioned either <b> or <strong>
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.
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 :)
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...
Do you have an example of such a link? Does it specifically mention Access?
ASKER
I looked at that link. Nowhere did I find <b> mentioned.
ASKER
no, that link only mentions <strong> which doesn't work either :)
ASKER
Either way, try the method I mentioned in my original post.
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
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:#F FFF00">d</ font>
...
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:#F
...
Try looking at this sample database. Does the report properly bold and italicize the words?
RichTextTest.zip
RichTextTest.zip
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
I just tested using an mdb and it all worked fine for me.
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 !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good catch. I too would have never of thought of that.
Yes, nice catch. I would not have thought of that either.
ASKER
Yes, pretty strange - have a nice evening (as it is here in Denmark :))
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:
Open in new window