Check box results into a query

M

michaeljblowers

Hi, I have table which has about 10 Yes/No fields. Each record also
has a key/record number and as each record represents a press cutting,
there is also a cutting readership figure. I am trying to put together
a query which will total up the readership for each of the 10 fields
which have a 'yes' in them. Ideally the query should return a listing
for the 10 Yes/No variables followed by the sum of readership. I am
far from being a semi-capable programmer so apologies if this defies
logic!
 
P

Piet Linden

Hi, I have table which has about 10 Yes/No fields. Each record also
has a key/record number and as each record represents a press cutting,
there is also a cutting readership figure. I am trying to put together
a query which will total up the readership for each of the 10 fields
which have a 'yes' in them. Ideally the query should return a listing
for the 10 Yes/No variables followed by the sum of readership.  I am
far from being a semi-capable programmer so apologies if this defies
logic!

Maybe it's because it's late, but I don't follow. Could you give a
*short*/simplified example? Right now I'm not sure if your structure
is ideal -- but maybe that's because I don't understand the
question.

If you want to sum *across* columns (not rows/records) then you can
use
SELECT ABS(YesNoField1) + ABS(YesNoField2)...
And you'll get a count of "yes" (represented in Access as -1).
 

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