Forum Discussion
Tony2021
Jan 12, 2022Iron Contributor
Format text box as italics and blue
Experts, how would I format the [txtSection] as italics and blue? =[Short Description] & " [" & [txtSection] & "]"
- Jan 13, 2022
Tony2021
Jan 13, 2022Iron Contributor
George, thank you.
My fields are in a report if that matters.
My field is not a rich text either.
I dont think having 2 text boxes side by side would work since the field [Short Description] can grow and I need to have the txtSection at the end of the last word of field [Short Description]. Is there another trick you might know of?
I thought I could simply add the word format([txtSection],"vbBlue" (like you would a currency field) but I guess I can not do that.
My fields are in a report if that matters.
My field is not a rich text either.
I dont think having 2 text boxes side by side would work since the field [Short Description] can grow and I need to have the txtSection at the end of the last word of field [Short Description]. Is there another trick you might know of?
I thought I could simply add the word format([txtSection],"vbBlue" (like you would a currency field) but I guess I can not do that.
arnel_gp
Jan 13, 2022Iron Contributor
agree. you should select Rich Text as Text Format for your Unbound textbox.
on its ControlSource:
=[Short Description] & " <font color=""#0072BC""><em>" & [txtSection] & "</em></font>"
on its ControlSource:
=[Short Description] & " <font color=""#0072BC""><em>" & [txtSection] & "</em></font>"
- Tony2021Jan 13, 2022Iron Contributor
George, I have made the change of both fields to Rich Text. The output seems unchanged. I do remember that sometimes you could get extranneous characters (# sign or some < > or others). I do not see any of those characters in the conversion.
Arnel, thank you.
Should I populate the above with my font and not sure if I need to populate em with something?The output looks like this (no change in text color and I see the codes.
- George_HepworthJan 13, 2022Silver Contributor
Tony2021 You should have a Ribbon Tab enabled for the Rich Text controls which offers the options of font and color, etc. No need to enter the markup manually.
- Tony2021Jan 13, 2022Iron ContributorGeorge, but since I have 1 text box that concactenates (not sure if that is an accurate term) then I would think I would need to add the formatting as Arnel suggested since I want to change the color and add italics for only 1 of the fields in the concactenated text box. maybe I am not following.