How to calculate column total

  • Thread starter Thread starter John Egan
  • Start date Start date
J

John Egan

This may seem a stupid question. I just need to sum the values of a single
field in each record, but I can't find a way to do this in a query. The
"sum" function seems to operate on a single record, rather than a single
field in each record.

Any help greatly appreciated.
 
Generally, in a query the field you are summing on is the only field that
should be in the query unless you are grouping on another field.

You can sum a field on a form or report by creating a textbox control on the
form and setting the Control Source to =Sum([fieldname]). Depending on where
you place this will depend on the results you get. This method is best used
on a form/subform scenario. On a report you can create a grouping report and
sum the field for each group or you can place the calculation at the end of
the report to get the overall total. You can also add a duplication of the
field on a report and set it to running sum.

Hope this helps.
 
-----Original Message-----
This may seem a stupid question. I just need to sum the values of a single
field in each record, but I can't find a way to do this in a query. The
"sum" function seems to operate on a single record, rather than a single
field in each record.

Any help greatly appreciated.


.The only way i found to do this was to produce a further
summary query based on original query. Had to make sure
each item had a ID though. Gives you the option to count
how many items also to total sum
 
Back
Top