Color code Yes/No checkbox and text dependent on checkbox

T

TotallyConfused

Can you color code a checkbox where if it is checked for a yes than the text
would be boldede and colored in Red? I have tried conditional formatting but
it is greyed out when in Design View and checkbox is selected. I don't have
much knowledge of code I would like to do this without using code. Can this
be done? thank you
 
R

Rick B

In design view, you would highlight the textbox you want to change, then
select conditional formatting. Sounds like you might be trying to
conditional format the checkbox. You want to conditional format the text
field.
 
K

Klatuu

Conditional formatting does not work for check boxes or labels and check
boxes do not have a back color. What you can do is change the back color of
the label associated with the checkbox.

You would do this in the After Update event of the check box:

Me.MyLableName.BackColor = Iif(Me.MyCheckBoxName = True, vbRed, vbWhite)

This will turn the background of the label red when the check box is checked
and white if it is unchecked.
 
Top