G
Guest
I know how to do a subtotal for the form by using =nz(Sum([Amount])) in the
form footer. But is there a way to only sum the Amount when the value of
another field is 1,3,5, etc. but not 2, 4? Kind of like the SumIf function
is Excel.
What I have is a subform where the user can enter activities and a dollar
amount.
Amount ActivityType
--------- -------------
$50 Sales
$25 Refund
$5 Other credits
If I use Sum(Amount), the subtotal would be incorrect because Refund and
Credits need to be deducted and not added. I was thinking of adding all the
Refund and Credits and subtracting that total from sum(Amount) to get the
correct subtotal. Is this the best/correct approach? Does anyone have a
suggestion?
thank you!
form footer. But is there a way to only sum the Amount when the value of
another field is 1,3,5, etc. but not 2, 4? Kind of like the SumIf function
is Excel.
What I have is a subform where the user can enter activities and a dollar
amount.
Amount ActivityType
--------- -------------
$50 Sales
$25 Refund
$5 Other credits
If I use Sum(Amount), the subtotal would be incorrect because Refund and
Credits need to be deducted and not added. I was thinking of adding all the
Refund and Credits and subtracting that total from sum(Amount) to get the
correct subtotal. Is this the best/correct approach? Does anyone have a
suggestion?
thank you!