Need to count check boxes without getting negative numbers

G

Guest

I have a query that only singles out my boxes that are checked. But all the
numbers are -1. I know that's how Access recgonizes True, but now that I'm
building my report I have -1,-2,-3. How do I just have it count positive not
negative?
 
J

JR

Hi,

Not sure if this is what you want?

SELECT Sum(IIf([YourFieldName]=-1,1,0)) AS [Positive Count]
FROM tblTestData;

Returns a count of all records where your true/false field was true.

JR
 
M

Marshall Barton

Athena said:
I have a query that only singles out my boxes that are checked. But all the
numbers are -1. I know that's how Access recgonizes True, but now that I'm
building my report I have -1,-2,-3. How do I just have it count positive not
negative?


Put a minus sign in from of the expression or use the Abs
function.
 

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