DCount and Grouping

W

wrkngrl

I am a new user, if anyone has time I would appreciate some advice.

I have the code below. I have lists of courses and want to have them
grouped by school year [ScYr] and [term] which is either fall or spring and
also by [type] which is one of three options depending on difficulty of the
course.

DCount is performing the count on the whole table. I want it to perform it
on the grouping specified (ie the number of classes that have enrollments
[actual] between 1 and 10 for the given term/year/type combo). I assume I am
using DCount wrong. What should I be doing?

Thanks,
Hilary

SELECT Master.ScYr, Master.Term, Master.Type,
DCount("[actual]","master","[actual]>1 and [actual]<11") AS EnrollTenLess,
FROM Master
GROUP BY Master.ScYr, Master.Term, Master.Type,
ORDER BY Master.ScYr, Master.Term, Master.Type;
 

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

Similar Threads

DCOUNT 11
DCount within a Group 2
Multi-Selection with Hand-writing draw tool 0
Help with Iif on Report 4
Help with multiple Dcount condition 2
Ranking 6
very slow report with dcount() 6
DCount Problem 20

Top