Count

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
 
R

Rob Parker

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
 
L

luanhoxung

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"))
 
G

Guest

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"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top