Apply Conditional Formatting in Microsoft Access Reports
by Avantix Learning Team | Updated October 14, 2022
Applies to: Microsoft® Access® 2010, 2013, 2016, 2019, 2021 and 365 (Windows)
You can highlight values or records in a Microsoft Access report using conditional formatting. Conditional formatting is used to change the appearance of a bound control such as a text box based on a rule. Certain conditions must be met in order for the formatting to be applied. You can apply conditional formatting in Layout View or Design View. Conditional Formatting appears in the Report Design Tools Format tab in the Ribbon:
Recommended article: How to Create a Calculated Field in a Microsoft Access Query
Do you want to learn more about Microsoft Access? Check out our virtual classroom or in-person classroom Access courses >
If you want to apply conditional formatting to controls, you may want to remove alternate row shading in Design View:
- Right-click the report tab and select Design View (or right-click in a blank area on the report and select Design View).
- Right-click the Detail section.
- In the drop-down menu, select Alternate Row Shading and then select No color or white.
Apply conditional formatting in Layout View
To apply conditional formatting in Layout View:
- Right-click the report tab and select Layout View (or right-click in a blank area on the report and select Layout View).
- Click the control or controls to which you want to apply conditional formatting. If you want formatting to apply to the entire record, Shift-click on all of the controls in a single record.
- Click the Report Design Tools Format tab in the Ribbon.
- Click Conditional Formatting in the Control Formatting group.
- In the dialog box that appears, click New Rule.
- Click Check values in the current record or use an expression or click Compare to other records.
- Enter the desired rule.
- Select the formatting you want to apply such as font color.
- Click OK twice.
- Right-click the report tab and select Print Preview to see how the formatting will appear if you print the report.
In the example below, we've entered a rule so that if the actual sales is greater than 50000, the entire record will appear in bold and a blue font color (note that the field actualsales must bound to a control such as a text box on the report):
Apply conditional formatting in Design View
To apply conditional formatting in Design View:
- Right-click the report tab and select Design View (or right-click in a blank area on the report and select Design View).
- Select the control or controls to which you want to apply conditional formatting. If you want formatting to apply to an entire record, Shift-click on all of the controls in the Detail section.
- Click the Report Design Tools Format tab in the Ribbon.
- Click Conditional Formatting in the Control Formatting group.
- In the dialog box that appears, click New Rule.
- Click Check values in the current record or use an expression or click Compare to other records.
- Enter the desired rule.
- Select the formatting that you want such as font color.
- Click OK twice.
- Right-click the report tab and select Print Preview to see how the formatting will appear if you print the report.
In the example below, we've entered a rule so that if the followup date is within 90 days after the current date, the entire record will appear in bold and a green font color (note that the field followupdate must bound to a control such as a text box on the report):
If you want to apply fill formatting to an entire record, the controls (usually text boxes) would need to "touch" the next control or you would see gaps in the record.
Also, in the list of conditional formatting rules in the Conditional Formatting dialog box, a rule higher in the list takes precedence over a rule lower in the list. So if a value or record is formatted using conditional formatting using multiple rules, the rule highest in the dialog box would "win". You can change the order of precedence by clicking the move up and move down arrows in the dialog box.
This article was first published on May 17, 2019 and has been updated for clarity and content.
Subscribe to get more articles like this one
Did you find this article helpful? If you would like to receive new articles, JOIN our email list.
More resources
Key Features and Benefits of Microsoft Access
How to Filter a Report on the Fly in Microsoft Access
10 Tips for Creating Select Queries in Microsoft Access
10 Techniques for Designing Forms in Microsoft Access
How to Convert a Microsoft Access Report to PDF (3 Ways)
Related training
Microsoft Access: Introduction
Microsoft Access: Intermediate / Advanced
Microsoft Access: Introduction to VBA (Visual Basic for Applications)
Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at info@avantixlearning.ca if you'd like to arrange custom instructor-led virtual classroom or onsite training on a date that's convenient for you.
Copyright 2023 Avantix® Learning
You may also like
How to Lock Cells in Excel (3 Ways)
It's easy to lock and protect cells in Microsoft Excel to prevent users from changing data or formulas. This involves a two-step process …
How to Stop or Control Green Error Checking Markers in Excel
In Microsoft Excel, errors are flagged with small green marker or triangle in the upper left corner of the cell. However, these indicators display when there may be an error but is, in fact, not an error.
How to Password Protect Your Excel Worksheets and Workbooks
You can password protect worksheets and workbooks in Excel. If you want to prevent other users from opening or modifying an Excel workbook, you can encrypt the file with a password. You can also protect workbook structure where you can prevent users from deleting, renaming, moving or unhiding worksheets. Password protection can be added to your Excel file in several ways.
Microsoft, the Microsoft logo, Microsoft Office and related Microsoft applications and logos are registered trademarks of Microsoft Corporation in Canada, US and other countries. All other trademarks are the property of the registered owners.
Avantix Learning |18 King Street East, Suite 1400, Toronto, Ontario, Canada M5C 1C4 | Contact us at info@avantixlearning.ca
