Field with Rich Text using <font face="font name">

Viewed 41

I am taking advantage of a rich text field to format a textbox with multiple colors and fonts. I can use any font as long as there is no space in the font name. Example, "impact" font works fine but "Segoe MDL2 Assets" will not work. I used the '' in the place of " and I still have problems. Is there any way to call the Segoe MDL2 Assets font to address this issue?

SELECT "<font face=''Segoe MDL2 Assets'' color=#557091>" & [ObjectGlyph] & "</font> " & [ObjectName] & IIf(IsNull([Remark]),"","  <font face=''Segoe MDL2 Assets'' color=#FFFFFF>(" & [Remark] & ")</font>") AS ListName, qryNexusUnion.*
FROM qryNexusUnion
ORDER BY qryNexusUnion.SortGroup, qryNexusUnion.ObjectCode, qryNexusUnion.ObjectName;
1 Answers

Apostrophe (aka single quote) does not work - singled or doubled.

Use doubled quotes:

SELECT "... face=""Segoe MDL2 Assets"" ..." AS ListName

or apostrophes for the outer delimiters and embedded singled quotes (not doubled single quote aka apostrophe):

SELECT '... face="Segoe MDL2 Assets" ...' AS ListName

Related