A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

=Count([field])



 
 
Thread Tools Display Modes
  #1  
Old December 9th, 2005, 07:30 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default =Count([field])

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?
  #2  
Old December 9th, 2005, 08:14 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default =Count([field])

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
http://I.Am/DougSteele
(no e-mails, please!)



"Ken" wrote in message
...
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?



  #3  
Old December 9th, 2005, 08:36 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default =Count([field])

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" wrote in message
...
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
http://I.Am/DougSteele
(no e-mails, please!)



"Ken" wrote in message
...
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?





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.