Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grand Total With a Filter (Can it be done?) 1

Status
Not open for further replies.

Baldrick615

Technical User
Nov 11, 2003
2
US
I am trying to write a Report Footer which will list a sepearte set of totals based upon a Flag Field set in the Detail section. The report lists items, weights, and cost and all totals function correctly without a 'filter'. However, I want to put another total that omits data that contains a "Dealer" flag (i.e., if [DEALER]= "Yes", Sum[WEIGHT] otherwise don't include it in the total line). I do want all the records to show up in the detail report however. How do I embed a filter based on the [DEALER] field which is on every record of the detail section on the report?

Any help would be great!
 
Assuming you have a field [Dealer] with text values like "yes" (not a yes/no field) and you want to Sum the [Weight] field for only those records where [Dealer]="yes".

=Sum(Abs([Dealer]="Yes") * [Weight])

Duane
MS Access MVP
 
The [Dealer] field is "Yes/No ". I guess that rules out the ABS formula. Is there some other way around that?
 
That is simpler. Just change the expression to:
=Sum(Abs([Dealer]) * [Weight])

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top