georgesOne
Technical User
Dear All:
I use the following code snippet (replace function) to modify the attributes of a text item in a rich text box (Topic1 is a textbox, sFieldName is a variable)
This works, but I cannot get the constants/nomenclature for making the selected text => bold and the background of the selected text => yellow.
Any help? Thanks, georges.
I use the following code snippet (replace function) to modify the attributes of a text item in a rich text box (Topic1 is a textbox, sFieldName is a variable)
Code:
.....
Const sTagColor = "<font color=""""red"""">"
Const sTagLarge = "<font size=""""3px"""">"
Const sTagEnd = "</font>"
If sFieldName = "Topic" Then
Me.Topic1.ControlSource = "= IIf([" & sFieldName & "] Is Null, Null, " & _
"Replace([" & sFieldName & "], """ & sDescriptor & """, """ & _
sTagColor & sTagLarge & sDescriptor & sTagEnd & sTagEnd & """))"
End If
.....
This works, but I cannot get the constants/nomenclature for making the selected text => bold and the background of the selected text => yellow.
Any help? Thanks, georges.