Summing in a report footer

daved2424

Registered User.
Local time
Today, 21:03
Joined
Jun 28, 2001
Messages
20
I have a field called cost and a field called caller. I want to calculate the sum of cost where the field caller is equal to a specific value. I.e.

A____B____
------------
12___One__
09___Two__
02___One__
03___One__
04___Two__
10___One__

Total where of A where B = One:
27

I'm having trouble with the sytax of this, can anyone help me out?
 
Last edited:
daved,

From attached db, run the form F_Table1 and click the command button 'preview report'. You will be prompted to input caller. Please input same caller which you have in your table. Wrong caller input will represent 0.

I hope at least you will have some idea from the attached db to solve your problem.

With kind regards,
Ashfaque
 

Attachments

Last edited:
=Sum( Iif([FieldB]="One",[FieldA],0))
 
Thanks Rich,

You made it more short_n_easy. Based on your trick, I attached updated file for Daved.

With kind regards,
Ashfaque
 

Attachments

Users who are viewing this thread

Back
Top Bottom