Using count in a sub form

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

Guest

I am using =count([Issued]) to count the number of shares owned by the
shareholder displayed in the main form. Issued is a check mark that
represents checked = yes and unchecked = no. Currently, the count returns the
count of both the checked and unchecked. If I use dcount([Issued]), I can set
criteria, but it count returns all the shareholder not just the one dislayed.
Does anyone know how to count only the checked in the subform.

Thanks
 
The count function will count any field which has a value. Since both Yes
and No are values, it will count all of them. (Yes is represented as -1 and
No is represented as 0). However, if you use:
=abs(Sum([Issued])),
you should get the correct number. Sum will total all the values, but it
will be a negative number. ABS is the absolute value function which will
convert it to a positive number.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



um will sum up all the values.
 
Back
Top