This is hopefully a simple one.
How can I count records based on criteria? So it would be a count of 'Active' ('Status' Field) for each 'Group'.
I'm looking to go from something like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Group[/TD]
[TD]RecordID[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]0001[/TD]
[TD]Active[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]0002[/TD]
[TD]Closed[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]0003[/TD]
[TD]Active[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]0004[/TD]
[TD]Active[/TD]
[/TR]
</tbody>[/TABLE]
etc....
To this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Group[/TD]
[TD]Active Records[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]25[/TD]
[/TR]
</tbody>[/TABLE]
I've tried the below as a field in the query but it returns the wrong numbers:
[FONT="]
[/FONT]
How can I count records based on criteria? So it would be a count of 'Active' ('Status' Field) for each 'Group'.
I'm looking to go from something like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Group[/TD]
[TD]RecordID[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]0001[/TD]
[TD]Active[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]0002[/TD]
[TD]Closed[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]0003[/TD]
[TD]Active[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]0004[/TD]
[TD]Active[/TD]
[/TR]
</tbody>[/TABLE]
etc....
To this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Group[/TD]
[TD]Active Records[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]25[/TD]
[/TR]
</tbody>[/TABLE]
I've tried the below as a field in the query but it returns the wrong numbers:
[FONT="]
Code:
[/FONT][/COLOR][COLOR=#2F2F2F][FONT="]=DCount("[Group]", "tblRecords", "[SalesStatus] = 'Active'")[/FONT][/COLOR][COLOR=#2F2F2F][FONT="]
[/FONT]
Last edited: