Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum the values of a checkbox

Status
Not open for further replies.

serino64

Programmer
Feb 25, 2003
32
US
I have a checkbox called UNREP. What I would like to do is sum all the values checked "Yes". I have the following code.

=Sum([UNREP])

The problem I am having, is it returns a "negative" value. How do I get rid of the "Negative sign"?
 
Simplest way is to multiply by (-1) this will return positive value.

Sum([unrep])*(-1)

You can also use a count query grouping on unrep criteria equals true
 
This is for the count query, go to the querys tab and press new, select design view. I used "table1" just substitute your table name that contains "unrep". Change from design view to SQL view and paste the following:

SELECT Count(Table1.unrep) AS Count
FROM Table1
GROUP BY Table1.unrep
HAVING (((Table1.unrep)=True));



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top