Using DCount in report with parameter qry

F

Flopbot

Hi. I’m having a little trouble with this. I don’t know a lot about reports
so any advice would be appreciated. I’m using Access 2003 and have a report
based on “Departmental Hours by Month Parameter Qryâ€. This parameter query
returns the total number of hours worked (grouped by department) and prompts
me for the year and month volunteered. The top “half†of my report displays
this information while I want the bottom “half†to return several numbers
that don’t come from the main query.


I was able to get the first number (“Total # of Active Volunteersâ€) to work
using:

=DCount("[Volunteer ID]","Active Volunteers Qry KEEP")


However, I can’t get the second number (“Total # of Volunteers this Monthâ€)
to work and I don’t know why. The main difference is that this is a
parameter query. It uses identical prompts to the report’s main query. Do I
need to do something special for parameter queries?

=DCount("[Volunteer ID]","Volunteers by Month Parameter Qry KEEP")
 
D

Duane Hookom

IMO, parameter prompt queries are not appropriate. Always use controls on
forms to get input from users. Rather than DCount() I would consider a
subreport.
 

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