Counting sub-groups

liddlem

Registered User.
Local time
Today, 19:07
Joined
May 16, 2003
Messages
339
Hi all
I have the 'Source data' (as per the sample data in the attached spreadsheet) but now I need to count groups of records to get the results to display as per 'Count Of'

This data is selected between Start_Dt and End_Dt which I have on a form called 'Frm_Reports'

I cant create crosstabs because the values are subject to change, which means that column headings are going to be all over the place.

And if I try creating counters in each section of the report, (see the range highlighted in blue) I cannot simply hide the respective headers/footers of each sub-group and then assign a total value in the footer of the 'Presenter' group. The total always comes to 339 - being the count of patients.

Can you point me in the right direction please.
 

Attachments

In most "big brothers" of Access like SQL Server MySQL or Oracle you can do Count(Distinct Anycolumn) and get what you are after....

However unfortunately this option doesnt exist in Access as far as I know. Instead you have to do it in two steps something along the lines of:
Code:
Select Presenter, Count(*) Countingcolumn
from ( select presenter, ws_venue_id
         from yourtable
         group by presenter, ws_venue_id )
group by Presenter

Really something M$ should add to the Access SQL
 
Thanks namliam
I'll give this a crack shortly.
 

Users who are viewing this thread

Back
Top Bottom