- database solutions and downloads for microsoft access

Create Better MS Access Reports
Report Builder for Microsoft Access helps you create dynamic, professional-looking reports fast! The easy-to-understand wizard helps you with complex tasks like calculated fields, adding subreports, customizing styles, as well as grouping and sorting. Download a free trial today!

Microsoft Access 2007 Reports

Creating Alternate Row Colours in a Microsoft Access 2007 Report

In previous versions of Microsoft Access, namely 2000, XP and Microsoft Access 2003, we had to use VBA code to produce alternate row colours on a Microsoft Access report.

We did this by adding code to the On_Format event of the report. We can see the required code in a previous article, found at Alternate row colors on reports with Microsoft Access

By default, Access formats each row of a report's detail section with the same background color. When printing a report, shading every other line of the detail section can make it much easier to read. With Microsoft Access 2007 this process has been greatly simplified, and we can create the alternate row colors by setting the Alternate Fill/Back Color from the detail properties of the report or from the Font tools on the Format tab of the Report Layout Tools.

You can use the AlternateBackColor property to specify a color to be displayed or printed on every other line in the detail section when viewing or printing a report.

If we look at the following report example, data in the detail section of the report is quite hard to read as there is no separation between records:

Microsoft Access report, containing no detail section row formatting.

To apply alternate row colours in the Access 2007 report, we can do this in various ways. If we go to design view of the report and select the Detail section, we can then view the format properties for this section. Here we can specify an Alternate Back Color to be used. We can also set the Back Color for the detail section.

Setting Alternate Back Colors in report design view.

Setting an Alternate Back Color as above will give us the following report:

The report, containing alternate back colors for alternate rows.

We can also specify these settings using the Report Layout Tools, and the Format contextual tab. Here we can select a Row in Layout view, and specify the Alternate Row Color from the Font tools:

Setting the properties in report layout view.