DWJ said:
Need the =Count in report header to count the number of groupings produced.
Place a text box named txtGrpCount in the group header or
footer. Set its control source expression to =1 and its
RunningSum to Over All.
You can display the total number of groups in the report
footer section by using a text box with the expression:
=txtGrpCount
but that's not what you wanted, so ignore that.
To get the total in the report header, you first have to
force the report to be formatted twice. This can be done
easily by using a text box that references the Pages
property (e.g. =Page & " of " & Pages).
Now, add a module level declaration to the report's class
module:
Private lngTotalGroups As Long
Add a line of code to the report footer section's Format
event procedure to save the end result of the running sum
text box to the variable:
lngTotalGroups = Me.txtGrpCount
Also add a line of code to the report header section's
Format event to copy the total to the report header text
box:
Me.txtHdrGroupTotal = lngTotalGroups