Won't total if any blanks

N

Newbie

I have a table with several Yes/No fields. I made a query that counts each
field and gives me the total number of 'Yes'. I made a report that shows me
the field name and the number of 'Yes'. In the report footer, I am trying to
total all the fields. I have made an unbound text box and used the following
as it's control source:

=Sum([CountOfDC]+[CountOfIB]+[CountOfDD]+[CountOfImage]+[CountOfODP]+[CountOfNetmail]+[CountOfLoanApp]+[CountOfVisa/MC]+[CountOfLoan1]+[CountOfLoan2]+[CountOfLoan3]+[CountOfSavAcctNum])

My problem is if one field doesn't have any 'Yes', then it won't total. I
don't know why. I've never had to do this before and I'm lost as to why it
won't add.
 
O

Ofer

Try and add the NZ function before each fiel
=Sum(nz([CountOfDC],0)+nz([CountOfIB],0)+nz([CountOfDD],0)+nz([CountOfImage],0)+nz([CountOfODP],0)+nz([CountOfNetmail],0)+nz([CountOfLoanApp],0)+nz([CountOfVisa/MC],0)+nz([CountOfLoan1],0)+nz([CountOfLoan2],0)+nz([CountOfLoan3],0)+nz([CountOfSavAcctNum],0))
 

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