Part III: More-Advanced Access Techniques
718
- Change the Hide Duplicates property to Yes.
The default is No, which directs Access to display every instance of every field.
- Put the report back to Print Preview mode and enjoy the new report layout (shown in
Figure 20.13).
The report shown in Figure 20.13 is rptTabularGood.
FIGURE 20.13
Much better! Hide that repeating information.
Distinguishing the sales figures for individual employees in Figure 20.13 is much easier than it is
when the repeating information is printed on the report. Notice that no fancy programming or
report design was required. A simple property-value change resulted in a much more readable and
useful report. (Mainframe report designers working with traditional report writers would kill for a
report as good looking as the one shown in Figure 20.13!)
The Hide Duplicates property only applies to records that appear sequentially on the report.
As soon as Access has placed a particular Name value on the report, the name won’t be repeated in
records immediately following the current record. In Figure 20.13, the records are sorted by the
EmployeeName field, so all records for an employee appear sequentially as a group. If the report
were sorted by another field (for example, OrderID or OrderDate), the Hide Duplicates
property set on the Name field would apply only to those instances where the employee’s name
coincidentally appeared sequentially in multiple records on the report.
The Hide Duplicates property can be applied to multiple controls within a report. As long as
you understand that Hide Duplicates only hides subsequent duplicate values within a detail
section, you should be able to achieve the results you expect. (Note, though, that you may occa-
sionally run into unexpected results if only one of the multiple fields changes.)