Count Function

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

Guest

Hi, I hope someone can help me with this...

I'm working with a database that I created to keep track of response survey
results for various programs run in a county park system. The survey forms
has multiple, multi-part questions. I'm trying to design a report that
summarizes the data for each program, for instance telling me how many people
rated the park staff a "5" or how many heard about the program on the radio.

I've tried the count functions, both Dcount and count, (searched the
discussion groups and tried the suggestions to make sure I had the proper
format for the expression) but it does one of two things, it either gives me
an error or counts ALL the responses in the query that I use to separate out
the Program I'm looking for.

Am I wrong to try to use count expressions in a Report Body?

Is there something else that might work?

Thanks!
 
In a report

=DCount("[filedname]","[queryname]","[field]='what you are counting")

ex

=DCount("[Gender]","[Core Services query]","[Gender]='Female'")
 
Thanks, Chris,

I put it in as this:
=DCount("[12B]","[Program Specific Q12]","[12A]='5")

where 12B is my answer field, Program Specific Q12 is my query, and 5 is the
rating (answer) I'm trying to count

It still produced an error.

Does it make a difference if the answer field is from a combo box or not?



Chris Reveille said:
In a report

=DCount("[filedname]","[queryname]","[field]='what you are counting")

ex

=DCount("[Gender]","[Core Services query]","[Gender]='Female'")

--
Chris


Splinty said:
Hi, I hope someone can help me with this...

I'm working with a database that I created to keep track of response survey
results for various programs run in a county park system. The survey forms
has multiple, multi-part questions. I'm trying to design a report that
summarizes the data for each program, for instance telling me how many people
rated the park staff a "5" or how many heard about the program on the radio.

I've tried the count functions, both Dcount and count, (searched the
discussion groups and tried the suggestions to make sure I had the proper
format for the expression) but it does one of two things, it either gives me
an error or counts ALL the responses in the query that I use to separate out
the Program I'm looking for.

Am I wrong to try to use count expressions in a Report Body?

Is there something else that might work?

Thanks!
 
What is 12A? Is that the name of the control on the report?
--
Chris


Splinty said:
Thanks, Chris,

I put it in as this:
=DCount("[12B]","[Program Specific Q12]","[12A]='5")

where 12B is my answer field, Program Specific Q12 is my query, and 5 is the
rating (answer) I'm trying to count

It still produced an error.

Does it make a difference if the answer field is from a combo box or not?



Chris Reveille said:
In a report

=DCount("[filedname]","[queryname]","[field]='what you are counting")

ex

=DCount("[Gender]","[Core Services query]","[Gender]='Female'")

--
Chris


Splinty said:
Hi, I hope someone can help me with this...

I'm working with a database that I created to keep track of response survey
results for various programs run in a county park system. The survey forms
has multiple, multi-part questions. I'm trying to design a report that
summarizes the data for each program, for instance telling me how many people
rated the park staff a "5" or how many heard about the program on the radio.

I've tried the count functions, both Dcount and count, (searched the
discussion groups and tried the suggestions to make sure I had the proper
format for the expression) but it does one of two things, it either gives me
an error or counts ALL the responses in the query that I use to separate out
the Program I'm looking for.

Am I wrong to try to use count expressions in a Report Body?

Is there something else that might work?

Thanks!
 
Is 12A the name of the control on the report?
--
Chris


Splinty said:
Thanks, Chris,

I put it in as this:
=DCount("[12B]","[Program Specific Q12]","[12A]='5")

where 12B is my answer field, Program Specific Q12 is my query, and 5 is the
rating (answer) I'm trying to count

It still produced an error.

Does it make a difference if the answer field is from a combo box or not?



Chris Reveille said:
In a report

=DCount("[filedname]","[queryname]","[field]='what you are counting")

ex

=DCount("[Gender]","[Core Services query]","[Gender]='Female'")

--
Chris


Splinty said:
Hi, I hope someone can help me with this...

I'm working with a database that I created to keep track of response survey
results for various programs run in a county park system. The survey forms
has multiple, multi-part questions. I'm trying to design a report that
summarizes the data for each program, for instance telling me how many people
rated the park staff a "5" or how many heard about the program on the radio.

I've tried the count functions, both Dcount and count, (searched the
discussion groups and tried the suggestions to make sure I had the proper
format for the expression) but it does one of two things, it either gives me
an error or counts ALL the responses in the query that I use to separate out
the Program I'm looking for.

Am I wrong to try to use count expressions in a Report Body?

Is there something else that might work?

Thanks!
 
Try either
=DCount("[12B]","[Program Specific Q12]","[12A]='5'")
or
=DCount("[12B]","[Program Specific Q12]","[12A]=5)

You were missing a single quote after the 5

Since it is a numeric field you might not need the single quotes
 
Okay, maybe i am putting it in the wrong place?

I tried both
=DCount("[12B]","[Program Specific Q12]","[12B]=5")
and
=DCount("[12B]","[Program Specific Q12]","[12B]='5'")

to no avail.

I'm putting it in the control source of a text box. That's the correct place
right?

is there anything else that might make this not work?

(sorry i'm such a pain in the butt)
-S
 
I am not sure. If yo want you could send me a small sample of you database
and I could look at it. Of course, change anything confidential.

Email g a n d h a w k at g m a i l . c o m

I can recieve up to 20 meg
--
Chris


Splinty said:
Okay, maybe i am putting it in the wrong place?

I tried both
=DCount("[12B]","[Program Specific Q12]","[12B]=5")
and
=DCount("[12B]","[Program Specific Q12]","[12B]='5'")

to no avail.

I'm putting it in the control source of a text box. That's the correct place
right?

is there anything else that might make this not work?

(sorry i'm such a pain in the butt)
-S

Chris Reveille said:
Try either
=DCount("[12B]","[Program Specific Q12]","[12A]='5'")
or
=DCount("[12B]","[Program Specific Q12]","[12A]=5)

You were missing a single quote after the 5

Since it is a numeric field you might not need the single quotes
 
Back
Top