Grouping issues with query

deere8585

Registered User.
Local time
Today, 00:34
Joined
Jun 26, 2008
Messages
27
Hi,

I have a query with 3 fields (RecordDate/Site/ComplaintType)

I have added Criteria in the RecordDate field to select a date range & I have added Criteria in the Site field to select the site.

What I am looking for this query to return is a subtotal of each complaint type recorded at the selected site within the date range selected at the moment the return I get is as seen below

Date Site ComplaintType
01/01/09 1 A
01/01/09 1 B
01/01/09 1 A
01/01/09 1 C
02/01/09 1 A

If any one could advise me or even point me in the right direction with this it would be greatly appreciated - I'm eventually looking to use this information in a Report - looking through the forum it would seem that the alternative to trying to achieve that this way is to use a form to filter the criteria but I'm not sure this will help with my grouping issue- All opinions welcome!
 
You need to group by the complaint type and by site counting the complaint types where the dates are between x and Y. If you sort by you count column descending it will show the one with the highest count first.

David
 
Thank you once again David - seems to have worked a treat
 

Users who are viewing this thread

Back
Top Bottom