View Single Post
  #3  
Old July 7th, 2008, 12:37 AM posted to microsoft.public.access.queries
Dave
external usenet poster
 
Posts: 55
Default How to count a value in a field

Thanks for the reply.
If I do it this way - how do I keep the option field from repeating for
every record (I only need a total - not each record)

dave

"fredg" wrote in message
. ..
On Sun, 6 Jul 2008 14:36:38 -0700, dave wrote:

Access 2003

I am trying to run a query for a report.

One of the fields I need to report on is an "Option" field with 3
options.

How can I get a count of all of each Option?

There are several other fields on in the query with criteria

Thanks in advance,

dave


I would do this in the report itself.
Use 3 unbound text controls placed anywhere in the report EXCEPT in
the Page Header or Page Footer sections:

=Sum(IIf([OptionName] = 1,1,0))
=Sum(IIf([OptionName] = 2,1,0))
=Sum(IIf([OptionName] = 3,1,0))
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail