count subgroups

bbwolff

Registered User.
Local time
Today, 18:48
Joined
Oct 1, 2013
Messages
116
i mastered (in the most broad meaning of the word possible) tables and forms, moving on to queries. I found out that getting reports is a bit more complicated then i thought and I'm just a little step away from tossing it all away and write a code in vba, but I think this should be easier, specially modifiing.

I have a coloumn with a head of the group, a coloumn with an assistant, a procedure group and procedure. I'd likem a report/query that would write for each person how many times he was the head and assistant for each group and procedure)

quer1.png
 
Surely you can just do this in a query by changing the Group By option to Count..

If the Total category in the Query designer is not visible, right click and select Totals.
 
I'm sure it can be and that I'm doing something simple wrong.
I get either just numbers for subgroups or just the totals. Guess I'll have to add an expression to add subgroups.
another thing, same names appears in two coloumns, how can i get the number of times it appears in each coloumn? it seems to me that i get the same number for each (though some rows have the second number lower by 2.. weird..)

the sql i use is like this

Code:
SELECT tbl.Name, Count(tbl.Name) AS CountOfName, Count(tbl.Name1) AS CountOfName1
FROM tbl
GROUP BY tbl.Name;
 

Users who are viewing this thread

Back
Top Bottom