Totals in a report

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

I have set up 2 different fields for YES and NO in regards
to an RSVP list I am working on.

How do I get totals to calculate on a yes/no field?

Any suggenstions?
Thanks!
 
Hi Kathy

You mean you want a count of the records with a "Yes"?

There are a couple of options:

=Sum(IIf([YesNoField],1,0))
will add 1 to the total for every Yes, but it will be relatively slow.

For a faster result:
=Abs(Sum([YesNoField]))
uses the fact that Yes is -1 (or 1 in some databases) and No is 0. If
you add up all these values and switch it to a positive number, it will give
you the count.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.
 
Back
Top