Highlight a Report Field Based on a Yes/No Value in Microsoft Access
Question details
The user wants to highlight a report field when the Waiver Yes/No field is set to No.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A report displays a Name control alongside a Boolean Waiver field, and the user wants the Name control highlighted for records without a waiver.
- Observed behavior
- The desired result is for the Name control to use a distinct format whenever Waiver is No.
Confirm that Waiver is a Yes/No field and is included in the report's record source. Open the report in Design View or Layout View so you can select the Name control.
Apply a conditional formatting rule to the Name control
Use an expression to highlight the Name control when Waiver is No.
In the Navigation Pane, right-click the report and select Design View or Layout View.
Click the Name text box that should be highlighted, then select Format > Conditional Formatting.
Click New Rule, choose a rule for the current record, and select Expression Is. Enter [Waiver] = 0.
Use the formatting buttons in the rule dialog to choose a background or text color, then click OK and Apply.
Switch to Report View or Print Preview and verify that the Name control is highlighted for records where Waiver is No.

Work with exported report data in WPS Office
WPS Office is a free, lightweight alternative for working with exported report data in a familiar spreadsheet interface. Its Microsoft Office format compatibility makes it easy to move spreadsheet files between applications. WPS Office does not edit Access reports or fix their conditional formatting.

Frequently Asked Questions
What expression highlights records where Waiver is No?
In the report control's Conditional Formatting rule, select Expression Is and enter [Waiver] = 0. Access stores No or False as 0.
How do I highlight the Name control when Waiver is Yes instead?
Open Format > Conditional Formatting for the Name control and use the expression [Waiver] = -1. Access stores Yes or True as -1.
Why doesn't the rule recognize the Waiver field?
Check that Waiver is included in the report's record source and that the expression uses the correct field name. You can inspect the record source in the report's Property Sheet.
Does the rule format the Waiver field or the Name control?
The rule formats the control you select before opening Conditional Formatting. Select the Name text box if that is the control you want to highlight.




