check box values in queries

G

Guest

I have a table that uses a check box (yes/no) to identify a sample as either
positive or negative. I want to create a query that will tell me how many
samples were positive. When I use the "sum" function I end up with a negative
value. When I use the count function the query returns a count of all
records. I have tried using the count function with the criteria set to -1
and to yes but the query either returns no records or all records.

Thanks for any help!
 
G

Guest

Alan,

The value for True is -1 in VBA. To convert to a positive number, simply
call the Abs() function (absolute value):

= Abs(Sum([MyField]))

Hope that helps.
Sprinks
 

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

Similar Threads


Top