If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Count
I would like to write a query or report that will show me
how many invoices each salesperson created. I have created a query with the following fields: invoice date, salesperson code, and invoice number. I grouped by salesperson code and did a count on invoice number. This created output of listing all invoices not a total number for each salesperson. Should I be using a query or a report for this. Can someone help me get the output I'm trying to get? As you can tell, I'm new to Access. Thanks in advance. |
#2
|
|||
|
|||
Terry,
Take the invoice date out of your query. Be sure you clicked on the Sigma button on the toolbar at the top of the screen. Run the query and you will get what you want. -- PC Datasheet Your Resource For Help With Access, Excel And Word Applications www.pcdatasheet.com "Terry" wrote in message ... I would like to write a query or report that will show me how many invoices each salesperson created. I have created a query with the following fields: invoice date, salesperson code, and invoice number. I grouped by salesperson code and did a count on invoice number. This created output of listing all invoices not a total number for each salesperson. Should I be using a query or a report for this. Can someone help me get the output I'm trying to get? As you can tell, I'm new to Access. Thanks in advance. |
#3
|
|||
|
|||
Think of grouping as forming a single row from a group of rows based on some
field. Note that once 'grouped' it no longer makes sense (and won't work) to try and list invoice date, inv no, etc. untested example SELECT [salesperson code] AS Salesperson, count([salesperson code]) AS [Inv Count] FROM tblInvoices GROUP BY [salesperson code]; Assuming I haven't made mistakes in above SQL (all fields are in same table tblInvoices & and substituting your own field names, etc) you should get output something like Salesperson Inv Count bj 0 pg 54 oo 159 etc. If needbe you can also add joins, criteria, etc to further refine your query. I would like to write a query or report that will show me how many invoices each salesperson created. I have created a query with the following fields: invoice date, salesperson code, and invoice number. I grouped by salesperson code and did a count on invoice number. This created output of listing all invoices not a total number for each salesperson. |
#4
|
|||
|
|||
Thanks for the replies. It works perfectly. You guys rock.
-----Original Message----- I would like to write a query or report that will show me how many invoices each salesperson created. I have created a query with the following fields: invoice date, salesperson code, and invoice number. I grouped by salesperson code and did a count on invoice number. This created output of listing all invoices not a total number for each salesperson. Should I be using a query or a report for this. Can someone help me get the output I'm trying to get? As you can tell, I'm new to Access. Thanks in advance. . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SUBTOTAL Second Count / sub-count of Filtered Visible Cells | QTE | General Discussion | 16 | August 4th, 2004 04:47 PM |
Distinct Report Count | Ben | Setting Up & Running Reports | 2 | August 3rd, 2004 08:38 PM |
SUBTOTAL Second Count / sub-count of Filtered Visible Cells | QTE | Worksheet Functions | 0 | July 27th, 2004 08:47 PM |
SUBTOTAL Second Count / sub-count of Filtered Visible Cells | QTE | Worksheet Functions | 3 | July 21st, 2004 11:50 PM |