Counting unchecked fields

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

Guest

I would like a text box on a report which carries a formula for counting
unchecked Yes/No fields. Would appreciate some help with this.
Thanks
 
Thanks for this. I've just tried it but it now asks me to enter a paramater
value.
Thanks in anticipation

Duane Hookom said:
=Sum([YesNoField]+1)

--
Duane Hookom
MS Access MVP


Anneg said:
I would like a text box on a report which carries a formula for counting
unchecked Yes/No fields. Would appreciate some help with this.
Thanks
 
I am having trouble seeing your application so I don't know what parameter
is being asked for? Did you replace [YesNoField] with your field name?

--
Duane Hookom
MS Access MVP


Anneg said:
Thanks for this. I've just tried it but it now asks me to enter a
paramater
value.
Thanks in anticipation

Duane Hookom said:
=Sum([YesNoField]+1)

--
Duane Hookom
MS Access MVP


Anneg said:
I would like a text box on a report which carries a formula for counting
unchecked Yes/No fields. Would appreciate some help with this.
Thanks
 
I put in the wrong field name. Many thanks. It works.
Kind regards

Duane Hookom said:
I am having trouble seeing your application so I don't know what parameter
is being asked for? Did you replace [YesNoField] with your field name?

--
Duane Hookom
MS Access MVP


Anneg said:
Thanks for this. I've just tried it but it now asks me to enter a
paramater
value.
Thanks in anticipation

Duane Hookom said:
=Sum([YesNoField]+1)

--
Duane Hookom
MS Access MVP


I would like a text box on a report which carries a formula for counting
unchecked Yes/No fields. Would appreciate some help with this.
Thanks
 
Could you also help with a formula for counting checked yes/no fields. Also,
what does the "+1" mean in the formula you wrote below.
Many thanks

Anneg said:
I put in the wrong field name. Many thanks. It works.
Kind regards

Duane Hookom said:
I am having trouble seeing your application so I don't know what parameter
is being asked for? Did you replace [YesNoField] with your field name?

--
Duane Hookom
MS Access MVP


Anneg said:
Thanks for this. I've just tried it but it now asks me to enter a
paramater
value.
Thanks in anticipation

:

=Sum([YesNoField]+1)

--
Duane Hookom
MS Access MVP


I would like a text box on a report which carries a formula for counting
unchecked Yes/No fields. Would appreciate some help with this.
Thanks
 
Anneg said:
Could you also help with a formula for counting checked yes/no
fields. Also, what does the "+1" mean in the formula you wrote below.
Many thanks

"No" is actually stored in a Yes/No field as a zero whereas "Yes" is stored as
negative one. So "magically" if you add one to all of the values the zeros
become positive one and the negative ones become zero. Thus, summing that
expression gives you the number of "Yes" values.

To count the "No" values use...

=Sum(Abs([YesNoField]))

The Abs() function returns the absolute value so negatives become positive and
zero is left alone.
 
Rick,
Thanks for explaining this. One minor change...
To count the "Yes" values use...
=Sum(Abs([YesNoField]))

--
Duane Hookom
MS Access MVP
--

Rick Brandt said:
Anneg said:
Could you also help with a formula for counting checked yes/no
fields. Also, what does the "+1" mean in the formula you wrote below.
Many thanks

"No" is actually stored in a Yes/No field as a zero whereas "Yes" is
stored as negative one. So "magically" if you add one to all of the
values the zeros become positive one and the negative ones become zero.
Thus, summing that expression gives you the number of "Yes" values.

To count the "No" values use...

=Sum(Abs([YesNoField]))

The Abs() function returns the absolute value so negatives become positive
and zero is left alone.
 
Anneg said:
Could you also help with a formula for counting checked yes/no
fields. Also, what does the "+1" mean in the formula you wrote below.
Many thanks

"No" is actually stored in a Yes/No field as a zero whereas "Yes" is stored as
negative one. So "magically" if you add one to all of the values the zeros
become positive one and the negative ones become zero. Thus, summing that
expression gives you the number of "Yes" values.

To count the "No" values use...

=Sum(Abs([YesNoField]))

The Abs() function returns the absolute value so negatives become positive and
zero is left alone.

Rick,
I think you meant to write:

Thus, summing that expression gives you the number of ** "No" **
values.

To count the ** "Yes" ** values use...

=Sum(Abs([YesNoField]))
 
fredg said:
On Thu, 24 Feb 2005 06:48:09 -0600, Rick Brandt wrote:
Rick,
I think you meant to write:

Thus, summing that expression gives you the number of ** "No" **
values.

To count the ** "Yes" ** values use...

=Sum(Abs([YesNoField]))

Yes, imagine a big NOT in front of my post : )
 
Many thanks everyone. You've been very helpful
Anneg

Rick Brandt said:
fredg said:
On Thu, 24 Feb 2005 06:48:09 -0600, Rick Brandt wrote:
Rick,
I think you meant to write:

Thus, summing that expression gives you the number of ** "No" **
values.

To count the ** "Yes" ** values use...

=Sum(Abs([YesNoField]))

Yes, imagine a big NOT in front of my post : )
 
Back
Top