var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Calculate the # of records of a specific type in a field
I have a database that has a field [Lock]
In the query/table, the field has a drop down box that shows different values, i.e. A1, B1, B2, B3, etc.
How do I (in a report) calculate the number of values for a specific value, i.e. I want to know how many A1's there are, etc, even if all values are showing in the report.
If you just want A1 (ie 1 particular value), use a DCount. If you want a summary of all of them, use a totals query in a subreport.
Can you explain a little more about the Totals Query in a subreport? I've never tried this before. I was looking at DCount, but I'm not sure that's what I need.
A DCount would be fine for 1 or 2, but too many will slow down the report, plus they're not dynamic. Try this query:
SELECT Lock, Count(*) AS HowMany
GROUP BY Lock