Unable to validate if text in control is bolded

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!
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top