Unable to validate if text in control is bolded

  • Thread starter Thread starter Silvio
  • Start date Start date
S

Silvio

I have to code below in order to turn the text bold off if it is on (on Mouse
move event to turn text in control box bold on or off when moving the mouse
over or away from it). It appears that the system does not recognize .FontOn
= True condition. Any idea?

If Me.TxSaveComment.FontBold = True Then
Me.TxSaveComment.FontBold = False
End If

Thanks!
 
Silvio said:
I have to code below in order to turn the text bold off if it is on (on Mouse
move event to turn text in control box bold on or off when moving the mouse
over or away from it). It appears that the system does not recognize .FontOn
= True condition. Any idea?

If Me.TxSaveComment.FontBold = True Then
Me.TxSaveComment.FontBold = False
End If


FontBold is kinda weird. You can test for 1 instead of
True, but I think it makes more sense to check for not
false.

If Me.TxSaveComment.FontBold <> False Then
Me.TxSaveComment.FontBold = False
End If
 
Back
Top