Conditional formatting checkbox??

G

Guest

Can you change the background of a checkbox to a different color? Due to the
limitations in Conditionaly Formatting, I would like for this one particular
checkbox background to turn yellow when checked. If so, can you please
provide an example in code? Any help will be greatly appreciated. Thank you.
 
J

Jeff Boyce

I'm not aware of a background color property associated with the checkbox.
However, I believe you could change the background color of the LABEL
associated with that control...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Thank you for your response. How would I write that in code, since I used up
my conditional formatting limit? Thank you.
 
J

Jeff Boyce

Create an Event Procedure for the Click event of that control. Your code
would be something like (untested aircode follows):

If Me!chkMyCheckBox = True Then
Me!lblMyCheckBoxLabel.BackgroundColor = vbRed
Else
Me!lblMyCheckBoxLabel.BackgroundColor = vbWhite
End If

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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