filtering then summing a field

F

fishqqq

I have a continuous form which has two fields in particular
[Sell Rate] & [Sell Rate Currency]

The currency will be either USD or CDN

At the Footer of the form i have two fields which i would like to sum
all the [Sell Rates] (which i can do) but i don't know how to get it to
filter the Currencies before it sums.
Can anyone show me how to do this.

I don't want to do this in a subform (via a query) as the user will
filter the data in the form to sort out specific customers etc - then
at the bottow it would show the totals. THat's how i'd like this to
work.

Suggestions are greatly appreciated.

Tks
Steve
 
M

Marshall Barton

I have a continuous form which has two fields in particular
[Sell Rate] & [Sell Rate Currency]

The currency will be either USD or CDN

At the Footer of the form i have two fields which i would like to sum
all the [Sell Rates] (which i can do) but i don't know how to get it to
filter the Currencies before it sums.
Can anyone show me how to do this.

I don't want to do this in a subform (via a query) as the user will
filter the data in the form to sort out specific customers etc - then
at the bottow it would show the totals. THat's how i'd like this to
work.


You can sum conditionally by using this kind of expression:

=Sum(IIf([Sell Rate Currency]="USD", [Sell Rate], 0))
 

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