Sub count???

  • Thread starter Thread starter **Danny Johnson**
  • Start date Start date
D

**Danny Johnson**

I am trying to get a query to work like this. I need it
to list our offices, then list the quantity of call types
that they received. For example:

Office Call type Number of calls
MLB Sale 3
Order Prob 6
Odr not Rec 2

HBK Sale 6
Order Prob 2
Odr not Rec 1

Any suggestions would be greatly appriciated.
Thank You
 
WAG to follow:
SELECT Office, CallType, Count([Call]) as NumberOfCalls
FROM tblWAG
GROUP BY Office, CallType;
 
Danny,

Have you considered a crosstab query with Office > Row Header, Call Type >
Column header (or the other way around) and Calls > Value (count)?

HTH,
Nikos
 
This is something like I am after but the suggestion
didnt work. Or not enought info was given based on my
knowledge of access.
I have a table called CallLog. This table has columns
Call Date, Office Code, Call Type. I need the query to
break the information down by office code and date,
Office Code and then what Call Types that were taken. I
have separate tables for the office codes and the call
types. I want it to list all the call types and they
respond with the number of calls for that type. I need it
to look something like this:

Date Office Code Call type Number of calls
2/22/04 32 Sale 3
ONR 2
PND 5
33 Sale 6
ONR 5
PND 5
2/27/04 32 Sale 6
ONR 1
PND 3
33 Sale 2
ONR 9
PND 17

I have tried some other suggestions that have been posted
but have not been able to get any of them to work. It may
be due to my limited expierence in Access.

Thank You
 
Try this SQL:
SELECT [CallDate], [OfficeCode], [CallType], Count([CallType]) as NumOfCalls
FROM CallLog
GROUP BY [CallDate], [OfficeCode], [CallType];
 
Back
Top