counting values in a column in Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on a database for help desk type calls. I have three call
categories and would like a running total of how many of each call I recieve.
These three values are located in one column of a table. What are my options
to make this happen?

Example:
Date Call Type Problem

11/5 Equipment VCR doesn't work
11/6 Computer Monitor wont turn on
11/6 Media CD is scratched
11/7 Equipment TV has no volume

I would like a report or something telling me that I have
2 Equipment calls
1 Computer Call
1 Media Call
 
Use a Totals query.

If building it through the GUI, you'd create a new query and add your table
to it. You'd drag the Call Type field, and one other field that you know is
never Null into the grid. You'd convert it to a Totals query (either by
clicking on the Sigma button on the button bar, or selecting Total from the
View menu.) That'll add a new row to the grid labelled "Total:", with the
value set to "Group By" under each active cell. Leave it as Group By under
the Call Type field, but change it to Count under the other field.

The SQL for the query will look like:

SELECT [Call Type], Count([SomeField])
FROM MyTable
GROUP BY [Call Type]
 
I am working on a database for help desk type calls. I have three call
categories and would like a running total of how many of each call I recieve.
These three values are located in one column of a table. What are my options
to make this happen?

Example:
Date Call Type Problem

11/5 Equipment VCR doesn't work
11/6 Computer Monitor wont turn on
11/6 Media CD is scratched
11/7 Equipment TV has no volume

I would like a report or something telling me that I have
2 Equipment calls
1 Computer Call
1 Media Call

You can use an aggragate query. In the query do a group by call type
and a count of the date field.
In SQL it would be written as:

select count(*), calltype from Table
groupby calltype

You then can use the query as the datasource in a report or subform.
Hope this helps.

MAC
 
Back
Top