How to Sum only Visible Rows

proballin

Registered User.
Local time
Today, 17:12
Joined
Feb 18, 2008
Messages
105
In my report I have some code that hides rows that meet a certain criteria. However I do NOT want to include the hidden data in the Sum. Nevertheless it is still calculated in. I am using a text box with a running sum as my SUM. Any clue on how to ONLY include the visible rows?
 
First I'd ask whether those rows can be excluded from the report in the first place, which would be the normal method. If not, try this in the report footer:

=Sum(IIf(YourCriteriaHere, FieldName, 0))
 
the criteria is if its a repeating/duplicate values, then 0.

how to code that?
 
Change the report's recordsource query to eliminate the duplicates.
 

Users who are viewing this thread

Back
Top Bottom