Count records in Parameter Query for Report

  • Thread starter Thread starter Flopbot
  • Start date Start date
F

Flopbot

I know this can be done, but I need some help. In Access ‘03 I have a report
based on “Qry Departmental Hours by Month Parameter LINKâ€. It works fine. I
also have a text box that counts my active volunteers using [
=DCount("[Volunteer ID]","Qry Active Vol LINK") ]. It works fine.

Finally, I have a text box that I want to count the total number of
volunteers who came in during “August 2009â€. It currently uses [
=DCount("[Volunteer ID]","Qry Vol by Month Parameter LINK") ] which does
not work.

In another strain, I read that DCount doesn’t work with parameter queries.
What else should I use instead? I just want the total #, not each individual
record.
 
I do believe that you must use the same criteria in the DCount as in your
parameter query.
 
Karl,

Thank you for helping. When you say criteria, do you mean the same
underlying query or the same prompt questions? My questions are [What year?]
& [What month?]. When I type in =DCount("[Volunteer ID]","Qry Vol by Month
Parameter LINK") ,which is an identical format to another working textbox,
I get #Error as a result.


KARL DEWEY said:
I do believe that you must use the same criteria in the DCount as in your
parameter query.
--
Build a little, test a little.


Flopbot said:
I know this can be done, but I need some help. In Access ‘03 I have a report
based on “Qry Departmental Hours by Month Parameter LINKâ€. It works fine. I
also have a text box that counts my active volunteers using [
=DCount("[Volunteer ID]","Qry Active Vol LINK") ]. It works fine.

Finally, I have a text box that I want to count the total number of
volunteers who came in during “August 2009â€. It currently uses [
=DCount("[Volunteer ID]","Qry Vol by Month Parameter LINK") ] which does
not work.

In another strain, I read that DCount doesn’t work with parameter queries.
What else should I use instead? I just want the total #, not each individual
record.
 
I do not know DCount syntax except that it seems you did not have criteria.

--
Build a little, test a little.


Flopbot said:
Karl,

Thank you for helping. When you say criteria, do you mean the same
underlying query or the same prompt questions? My questions are [What year?]
& [What month?]. When I type in =DCount("[Volunteer ID]","Qry Vol by Month
Parameter LINK") ,which is an identical format to another working textbox,
I get #Error as a result.


KARL DEWEY said:
I do believe that you must use the same criteria in the DCount as in your
parameter query.
--
Build a little, test a little.


Flopbot said:
I know this can be done, but I need some help. In Access ‘03 I have a report
based on “Qry Departmental Hours by Month Parameter LINKâ€. It works fine. I
also have a text box that counts my active volunteers using [
=DCount("[Volunteer ID]","Qry Active Vol LINK") ]. It works fine.

Finally, I have a text box that I want to count the total number of
volunteers who came in during “August 2009â€. It currently uses [
=DCount("[Volunteer ID]","Qry Vol by Month Parameter LINK") ] which does
not work.

In another strain, I read that DCount doesn’t work with parameter queries.
What else should I use instead? I just want the total #, not each individual
record.
 
Back
Top