getting a correct count for a report

cj_steve

Registered User.
Local time
Today, 13:43
Joined
Dec 3, 2002
Messages
12
hello,

I have a table that contains some of the following fields, where the field Free is a Yes/No Data type and Quantity is a Number type.

Free Quantity

1
10
X 1
X 2

I would like to get a total count to equal 11. So the pseudo code would be something like

sum of total quantity - sum of total free


what would my query be if I needed to generate the above outcome?

Thank you in advance
 
Something like:

Code:
SELECT Sum([Quantity])-DCount("[Free]","yourTable","[Free]=True") AS Total
FROM [yourTable];
 

Users who are viewing this thread

Back
Top Bottom