> In Access 2003, is conditional formatting possible on a Y/N checkbox?
> I have a fairly important checkbox that I would like to highlight in red if
> checked, to grab the user's attention.
> If it's not possible, any suggestions for other ways of doing this??
> Many thanks
> CW
Check boxes are graphic images and are not resizable nor color
changeable.
What you can do is change the color of the check box label using code,
if you are using Single Form view.
Code the Check Box AfterUpdate event:
If Me.CheckBoxName = True then
Me.CheckLabelName.BackColor = vbRed
Me.CheckBoxLabel.ForeColor = vbYellow
Else
Me.CheckLabelName.BackColor = vbWhite
Me.CheckBoxLabel.ForeColor = vbBlack
End If
*** Place the same code in the form's Current event. ***
or .... you could place a rectangle around the check box, Send it to
Back, and change it's backcolor using similar code to the above.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
CW - 19 Jan 2008 12:21 GMT
Thanks Fred, that looks good and I can see myself using that or similar code
in a number of other scenarios
CW
> > In Access 2003, is conditional formatting possible on a Y/N checkbox?
> > I have a fairly important checkbox that I would like to highlight in red if
[quoted text clipped - 20 lines]
> or .... you could place a rectangle around the check box, Send it to
> Back, and change it's backcolor using similar code to the above.
Or you could make a small text box and set the font to windings2 (P will give
you a tick).

Signature
Wayne
Manchester, England.
> In Access 2003, is conditional formatting possible on a Y/N checkbox?
> I have a fairly important checkbox that I would like to highlight in red if
> checked, to grab the user's attention.
> If it's not possible, any suggestions for other ways of doing this??
> Many thanks
> CW
CW - 19 Jan 2008 12:20 GMT
Thanks Wayne
CW
> Or you could make a small text box and set the font to windings2 (P will give
> you a tick).
[quoted text clipped - 5 lines]
> > Many thanks
> > CW
Ken Sheridan - 19 Jan 2008 18:26 GMT
Wayne's suggestion is the way to do it, but you need to do a little work:
1. Add the real checkbox, bound to the Boolean field in the table, to the
form and set its Visible property to false.
2. Add a text box sized to mimic a check box and set its FontName property
to Wingdings and its ControlSource property to:
=IIf([chkMyBooleanField],Chr(252),"")
where chkMyBooleanField is the name of the hidden real check box.
3. Use condtional formatting to set the colours of the text box as required
on the basis of Expresssion Is [chkMyBooleanField].
4. Add a button over the text box and set its Transparent property to True,
and for its Click event procedure use the following code:
Me!chkMyBooleanField = Not Me!chkMyBooleanField
When the user clicks the pseudo check box text box they will actually click
the button, which will set the value of the hidden real check box, and hence
the Boolean column it is bound to. The expression used as the text box's
ControlSource property will show it checked or unchecked and the conditional
formatting will change its colours.
PCW magazine did publish a form of mine showing how this is done, along with
other formats for pseudo check boxes, but I don't imagine its on their site
now. If you want a copy mail me at:
kenwsheridan<at>yahoo<dot>co<dot>uk
Ken Sheridan
Stafford, England
> Thanks Wayne
> CW
[quoted text clipped - 8 lines]
> > > Many thanks
> > > CW
CW - 20 Jan 2008 14:28 GMT
Ken - that's rather sneaky, and very creative. I will definitely give it a try.
Thanks
CW
> Wayne's suggestion is the way to do it, but you need to do a little work:
>
[quoted text clipped - 43 lines]
> > > > Many thanks
> > > > CW