Count

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

Guest

First let me apologize if this becomes a double post. I tried via Outlook and
I think things got screwed up...

This is my problem and question:

I have a field that is populated with either a YES, NO or REFUSED via a
combo box.

In my report, I am trying to capture only the count that pertains to YES.

In the control source of the field in the report I have:

=Count([FieldName]="Yes")

This gives me the count for all (YES/NO/REFUSED)

How can I filter so that I only get the count for the YES.

Thank you in advance for your assistance...

Rick
 
Hi Rick,

If you don't have the count available in the recordsource (query) of your
report, the simplest way is probably to just use dCount. Set the control
source to:
=dCount("*","[TableOrQueryName]","[FieldName] = 'Yes'")

Check out the help file, under Domain Aggregate Functions.

HTH,

Rob
 
First let me apologize if this becomes a double post. I tried via Outlook and
I think things got screwed up...

This is my problem and question:

I have a field that is populated with either a YES, NO or REFUSED via a
combo box.

In my report, I am trying to capture only the count that pertains to YES.

In the control source of the field in the report I have:

=Count([FieldName]="Yes")

This gives me the count for all (YES/NO/REFUSED)

How can I filter so that I only get the count for the YES.

Thank you in advance for your assistance...

Rick

Try:
=Abs(Sum([FieldName]="Yes"))
 
Thank you for the responses. It's working like a charm.

First let me apologize if this becomes a double post. I tried via Outlook and
I think things got screwed up...

This is my problem and question:

I have a field that is populated with either a YES, NO or REFUSED via a
combo box.

In my report, I am trying to capture only the count that pertains to YES.

In the control source of the field in the report I have:

=Count([FieldName]="Yes")

This gives me the count for all (YES/NO/REFUSED)

How can I filter so that I only get the count for the YES.

Thank you in advance for your assistance...

Rick

Try:
=Abs(Sum([FieldName]="Yes"))
 
Back
Top