Best way to sum

  • Thread starter Thread starter ZBC
  • Start date Start date
Z

ZBC

I have several reports that are based on queries from two tables (related).
I want to print various summary information from several fields based
on; is some cases 'months', and in other cases 'year' but would like to
choose the period for the report via a form from which the user will
initiate the report.
I assume I pass data to variables located in queries ... is this doable
and is it the best way?
 
Do you want to filter a report based on user input? If so, create a form
with some controls that can be referenced in the query criteria. You can
also build a "where" clause in the DoCmd.OpenReport code.

Adding text boxes to group and report footers allow you to sum your numeric
fields.
 
I want to sum several fields of specific records - such as: when name =
"Frank" or name = "Charles" ... then print the sum for such fields as
'amount' and 'costs' in the report. I also want to be able to select
the year(s) and or months for the report to cover.
 
To sum the amount field in the report where [FirstName] = "Frank" you would
add a text box to the report footer with a control source of:
=Sum( Abs([FirstName] = "Frank") * [Amount])
 
Back
Top