How do I get a TOTAL for a report of a grouped and counted field?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

'I have managed to 'group' a field and 'count' the grouped fields,(in a
query) now I want Access to give me the TOTAL count of the fields in a
report. How do I do that?
 
Rose said:
'I have managed to 'group' a field and 'count' the grouped fields,(in a
query) now I want Access to give me the TOTAL count of the fields in a
report. How do I do that?


Depends on what kind of total you're looking for.

You can use an aggregate expression in a text box control in
the Report and/or group header/footer sections. E.g.
To calculate the total number of records in the
report/group:
=Count(*)

To calculate the number of records with a non-Null value in
field1:
=Count(field1)

To calculate the sum of the non-Null values in field1:
=Sum(field1)

Unless you're creating a summary report, it is unusual for
the report's record source to be a Group By (Totals) query.
More common is to use the report's Sorting and Grouping
feature (View menu) to group records by a specified field.
You can then calculate group totals in the group
header/footer section and totals for the entire report using
the same functions the same way.
 
Marshall I'm not doing something right. I tried the
=Count(*), and your other suggestions but still not
getting the correct results. (I get #Error) I have a
query that is counting a field: "suffix" and the same
query is grouping the field "IDProfession". The query is
giving me MOST of what I want; It Groups the people into
Professions then it counts how many are in each
group..... Now I want the total number in ALL the
groups. - I am going into the report design veiw and
putting in your suggested info into the "Control Source"
ie: =Count(suffix), =Count(*), I tried IDProfession too.
Is that what I should be doing?
 
If the query has a calculated field named CountOfSuffix,
then the report footer text box should use the expression:

=Sum(CountOfSuffix)

Next time you have a question relating to a query, please
post a Copy/Paste of the query's SQL view so we can see
exactly what you're working with.
 
Back
Top