Best way to sum

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?
 
D

Duane Hookom

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.
 
Z

ZBC

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.
 
D

Duane Hookom

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])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top