Totaling a test field

  • Thread starter Thread starter Todd
  • Start date Start date
T

Todd

I want to have a totals field in a report footer where it
will add up all of the "Approved" items in the
[approved/denied] field. That way I will know how many
items are approved. How do I go about doing this in the
report?
 
try
=DCount("[approved/denied]","[Name of repor
query]","[approved/denied]='Approved'")

and

=DCount("[approved/denied]","[Name of repor
query]","[approved/denied]='Denied'")

Good Luc
 
In the textbox in the report footer enter
=Sum(IIF([approved/denied]="approved",[number to count],0))
you may have to substitute your own variable names.
Hope this helps.
Fons
 
This solution will fail when you open a report with a WHERE clause. The
where clause may create a smaller recordset than the report's query.

To count the number of records that match an expression like where
[Gender]="F" or [Dept]="HR", enclose the expression like:
=Abs(Sum(...YourExpresssionHere...))
=Abs(Sum([Gender]="F"))
=Abs(Sum([Dept]="HR"))
To sum one field based on an expression like Sum [Qty] * [UnitPrice] where
[Category]="Fruit"
=Sum( Abs([Category]="Fruit") * [Qty] * [UnitPrice])

--
Duane Hookom
MS Access MVP


Jim/Chris said:
try
=DCount("[approved/denied]","[Name of report
query]","[approved/denied]='Approved'")

and

=DCount("[approved/denied]","[Name of report
query]","[approved/denied]='Denied'")

Good Luck
 
Duane is correct. I guess I am used to having my where clauses in th
query itself. Thanks Duane for the clarification
 
Back
Top