Conditonal formatting a checkbox in a report...

  • Thread starter Thread starter James Newman
  • Start date Start date
J

James Newman

Hey all,

I am hoping this is a very simple question to answer. I am using
Access 2003 and have a report that has two text box fields and 12
checkbox fields the display a Paid/Unpaid status for each month. All
of these fields are located in the detail section of the report.

I would like to conditionally format the checkboxes and their labels
to appear red when unpaid (no check). If I select either of the two
text box fields I can select conditional formatting from the menu bar
but if I select any of the 12 checkboxes the conditional formatting
option is grayed out.

Am I missing something simple here??

Thanks for any help,
James Newman
 
I don't think you can apply conditional formatting to a check box, so how
about a text box that simulates the check box?

Delete the check box from the report.

Replace it with a text box, and set these properties:
Control Source NameOfYourYesNoField
Name NameOfYourYesNoField
Font Name Wingdings
Width 0.18 in
Format {see below}

Type these 3 characters in the Format property:
- Hold down Alt, and type 0168 on the numeric keypad. Release Alt.
- Type Backslash
- Hold down Alt, and type 0254 on the numeric keypad. Release Alt.

Now apply conditional formatting. The text box has the value True or False.

Duplicate this text box for your other fields as well.

The trick relies on the fact that Access uses 0 for False, and -1 for True.
The Format expression tells it to use different formatting for a negative
number. The actual formatting expressions are the Wingdings characters that
look like unchecked and checked boxes. If you have the Character Map
installed (Windows applet), use it to find the characters.

It's a useful trick, giving you not only conditional formatting and coloured
check boxes, but resizeable check boxes (just change the font size), blanks
for False, and unboxed check marks for True.
 
Back
Top