Total Grouping only when 2 or more records exist

  • Thread starter Thread starter Ali
  • Start date Start date
A

Ali

Access 2003 with 2000 format db

I have a report that lists member attendances. The report has a group
header and footer by member to give the total no. of days per employee, EG:

Member: 001
19/2/04 3
20/5/04 1
Total Days 4

Member: 002
19/2/04 1
Total Days 1

Report Total 5

By having the member footer on it makes the report very long because I get a
total for members when there is only 1 record.

Is it possible to surpress/shrink the member footer when the detail section
only contains 1 record i.e don't print a total Days but when the detail
section has 2 or more records to unshrink it a print a Total Days. If
possilbe how would I achieve it?

What I would like the above eg to look like is:

Member: 001
19/2/04 3
20/5/04 1
Total Days 4

Member: 002
19/2/04 1

Report Total 5


Thanks
 
You can use code in the Format event of the group footer section to suppress
the section if there is only one record.

Add a text box to the group footer with Control Source of:
=Count("*")
In the section's Format event, if that value < 2 then suppress the section
by setting the report's runtime properties PrintSection and MoveLayout.

When you programmatically suppress sections, you may find it does strange
things to the page count, e.g. the last page may show "Page 8 of 7".
 
Back
Top