If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using DCount in report with parameter qry
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") |
#2
|
|||
|
|||
Using DCount in report with parameter qry
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. -- Duane Hookom Microsoft Access MVP "Flopbot" wrote: 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") |
Thread Tools | |
Display Modes | |
|
|