daclown81
02-06-2002, 10:13 AM
I've made a query and I've got a field called AMOUNT that gives several dollar amounts for the records I've looked up in the query. Now how can I add all those Amounts up (those from the query) and get Sum that equals the Total Amount for the records I have in the query?
I'm trying to put a total amount on a report, but I can't figure out how to make access calculate the Sum of those fields.
mapondera
02-06-2002, 10:37 AM
Use the query wizard and select 'Simple Query' When you go through the wizard select the 'Summary' option. Click on the 'Summary' tab and select Sum for the Amount field.
Jerry Stoner
02-06-2002, 02:15 PM
Or do the calculation in the report footer.
=Sum([AMOUNT])
Pat Hartman
02-06-2002, 04:56 PM
Queries do not produce both summary and detail rows. The only way to achieve this is to create two queries, one to produce detail and a second to produce a summary row. Then create a union query to merge the two separate recordsets into one.
If you want the report to print the detail and then summarize it at various break points, do the summary calculations in the report. In the group and report footers add controls that use the sum() function:
=Sum(someField)
This calculation placed in a customer group footer would show the total for a customer and placed in the report footer would show the total for all customers.