Query & total

  • Thread starter Thread starter Anna
  • Start date Start date
A

Anna

Hi - I am using Access 2003.

I have a year to date query that pulls in orders purchased over $175. Now I
would like Access to count the number of orders for each month but I have no
idea how to do this - is it possible and if so how?

I know the very basics for Access and have never done this before so if
someone could explain it in the simplest terms for me it would be greatly
appreciated.

Thanks!!
 
When you build a query with the query builder wizard, there is a little E
button on your menu bar that causes Group by to come up on each field in your
query. Change the group by under orders to count.
 
Hi - I am using Access 2003.

I have a year to date query that pulls in orders purchased over $175. Now I
would like Access to count the number of orders for each month but I have no
idea how to do this - is it possible and if so how?

I know the very basics for Access and have never done this before so if
someone could explain it in the simplest terms for me it would be greatly
appreciated.

Thanks!!

Easily. Add a calculated field to your query by typing

MonthNo: Month([PurchaseDate])

into the query. This will have values 1 through 12. You can then change the
query to a Totals query and group by MonthNo. Include the table's primary key
as one field and use Count as the totals operator for that field; use the
"Where" operator for the date field itself. Perhaps if you posted the SQL view
of your current query someone could adjust it for you.
 
Back
Top