var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: conditional count in access report
Trying to count the number of record in a report that has a certain value in a field and it counts all the record in the report. Is there a way to count do a conditional count in a report?
A screen shot is attached to demonstrate what I am trying to do.
Last edited by mkasem; 01-01-03 at
there are more ways...... you have easy report without grouping....
1. add new column to your source query. This column holds your number only for Status = "L" MyField: IIF(Status = "L", MyValue,0)
then SUM that field
2. use DSUM function
= DSUM("MyValue", "MySourceTable", "Status = " & chr(34) & "L" & chr(34))
if you have special query for your report, you can use
= DSUM("MyValue", reports("myReport").recordsource, "Status = " & chr(34) & "L" & chr(34))
3. you can create variable in VBA and use IF statement.... this will take forever to run, but sometimes (in complicated report) it does it's job. In this case you have to understand how Access creates the report, cauze you could easily double count.