Counted Field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I set up the table that has field named CCA. Its data type is YES/NO. Is it
posible to count how many Yes or how many No in the forms or reports?
Please show me if it is Ok to make a total.

If it is not, do I need to change its data type to NUMBER?

Thanks
Chi Huynh
 
Access stores a Yes/No field as minus one or a zero. If you sum the field
the Yeses will total as a negative sum. Use function INT to remove the sign
like --
Int(Sum([YourField])
 
Use the DCount function

lngYes = DCount("[CCA]", "MyTableName", "[CCA] = -1 ")
lngNo = DCount("[CCA]", "MyTableName", "[CCA] = 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

Similar Threads

0 number 2
Access Dcount (multiple criteria) 3
Excel VBA - counting cells by colors and names to it in two different rows. 0
How to subtract a number from a Mergefield? 0
Meeting Request 4
Input Mask 1
cells 1
sum (above) 1

Back
Top