=Count([field])

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

Guest

I thought I could use COUNT to count the number of checked Yes/No boxes on a
form. Example, if Yes/No check box used to track orders sent, I thought I
could use the Check Box to set Order Sent to yes and then use COUNT to count
the number of Order Sent boxes that were checked. I'm using the formula
=count([OrdersSent]).

This is not working. Does anyone have a clue as to what I am doing wrong?
 
Try using =Abs(Sum([OrdersSent])).

In Access, True is -1 (and False is 0), so what you're doing is adding
together all of the Trues, then using the Abs function to convert them to a
positive value.
 
If you want to count the False values:
=Count([OrdersSent]) - Abs(Sum([OrdersSent]))

If you want to count the Null values:
=Count([OrdersSent]) - Count(*)

Douglas J. Steele said:
Try using =Abs(Sum([OrdersSent])).

In Access, True is -1 (and False is 0), so what you're doing is adding
together all of the Trues, then using the Abs function to convert them to
a positive value.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Ken said:
I thought I could use COUNT to count the number of checked Yes/No boxes on
a
form. Example, if Yes/No check box used to track orders sent, I thought I
could use the Check Box to set Order Sent to yes and then use COUNT to
count
the number of Order Sent boxes that were checked. I'm using the formula
=count([OrdersSent]).

This is not working. Does anyone have a clue as to what I am doing wrong?
 
Back
Top