Counting total jobs

G

Guest

My report has the body, and if I have done it rightly, I have put a subreport
in the report footer to count various fields in the report.
The sub report is based on a query with 3 fields a count of the total jobs
since 1998 (this is working on the report ok). There are three programs
under which jobs are done and paid for, so the totals I need to include in
the report are total jobs in each of the program, as well as total jobs for
each financial year.

I figured that by using the expression builder with a Dcount would produce
the desired result. The syntax I used was:
=DCount("[Total Jobs by Program]","qryCompletedJobs","[Program1]")
However this has produced an error. what am I doing wrong now?
 
G

Guest

What is the error you getting?

The Dcount consist of
DCount("*","TableName","Criteria")

so when using a Dcount with no criteria (count all the records) use
=DCount("*","qryCompletedJobs")

If you want to add a criteria, then you need to specify one.
Writing [Program1] in the criteria section does not filter the records
 

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