Counting Tick Boxes.

G

Guest

When in my query I sum tick boxes it gives me the correct number of ticks but
as a negative number.

(How do I get the correct number of ticks as a postive number?)

If I use the count function in the query it sum all the boxes, giving me a
total number of all fields with a tick boxes, irrespective of whether it is
ticked or not)
 
J

John Vinson

When in my query I sum tick boxes it gives me the correct number of ticks but
as a negative number.

(How do I get the correct number of ticks as a postive number?)

Put a minus sign in front of the expression:

- ([chkA] + [chkB] + [chkC])

or better (since some database backends use +1 for True while Access
uses -1) use the Abs() absolute-value function:

Abs([ChkA] + [ChkB] + [ChkC])

John W. Vinson[MVP]
 

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