A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count



 
 
Thread Tools Display Modes
  #1  
Old September 27th, 2004, 09:59 PM
Terry
external usenet poster
 
Posts: n/a
Default 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  
Old September 28th, 2004, 01:45 AM
PC Datasheet
external usenet poster
 
Posts: n/a
Default

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  
Old September 28th, 2004, 01:59 AM
Matthew
external usenet poster
 
Posts: n/a
Default

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  
Old September 28th, 2004, 01:56 PM
Terry
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.