counting

D

Dave Q

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
 
D

Duane Hookom

It's not good practice to start a new thread since we don't know what was
suggested previously and don't want to make the same suggestions as given
previously and didn't seem to work for you.
 
J

John Vinson

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

Two ways come to mind:

1. Create a Query based on your table. Make it a Totals query as
discussed in the previous thread. Select the [Date], [Office Code] and
[Call Type] fields, and then the [Date] again (if you don't have a
primary key field.

On the Totals row leave the default Group By on [Date], [Office Code]
and [Call Type], and change it to Count on the second instance of
[Date].

Open this query as a query datasheet and you should see something very
like this, except that there won't be blank lines for the duplicate
[Date] and
Code:
 fields.

2. Create a Report based on your table. Use the Sorting and Grouping
property of the report (right mouseclick the little square at the
upper left intersection of the rulers and select Sorting and
Grouping). Select Date and Office Code and sort Ascending, and select
Call Type and select "Show Footer". Put textboxes for Date, Office
Code, and Call Type in the Call Type footer, along with a fourth
textbox; set its Control Source to =Count(*). Don't put anything in
the Detail section of the report, just close it up to nothing.
 
J

Jazzman Dazzman

Regarding my earlier posting below, my Dbase is similar
but has a scale and is by project. I do desperately need
to get the count of the fields mentioned. Can someone
give me a hand, I'm racking my brains but getting nowhere.

Thanks, JMDM
-----Original Message-----
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

Two ways come to mind:

1. Create a Query based on your table. Make it a Totals query as
discussed in the previous thread. Select the [Date], [Office Code] and
[Call Type] fields, and then the [Date] again (if you don't have a
primary key field.

On the Totals row leave the default Group By on [Date], [Office Code]
and [Call Type], and change it to Count on the second instance of
[Date].

Open this query as a query datasheet and you should see something very
like this, except that there won't be blank lines for the duplicate
[Date] and
Code:
 fields.

2. Create a Report based on your table. Use the Sorting and Grouping
property of the report (right mouseclick the little square at the
upper left intersection of the rulers and select Sorting and
Grouping). Select Date and Office Code and sort Ascending, and select
Call Type and select "Show Footer". Put textboxes for Date, Office
Code, and Call Type in the Call Type footer, along with a fourth
textbox; set its Control Source to =Count(*). Don't put anything in
the Detail section of the report, just close it up to nothing.


.
[/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top