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 Group By
I have a table of transactions for multiple iterations of the same policy number. The Group By function works to LIST the distinct policy numbers, but how do I COUNT those "grouped" policy numbers to show results below?
The "kicker" is I'd like to use the query design view in Access (not paste and copy SQL)... e.g. trans 1, policy number abc trans 2, policy number abc trans 1, policy number xyz Results = 2 Policy numbers (not 3) |
#2
|
|||
|
|||
Count Group By
In Query Design, select View Totals. Set the Policy Number to Count
-- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Patrick" wrote in message ... I have a table of transactions for multiple iterations of the same policy number. The Group By function works to LIST the distinct policy numbers, but how do I COUNT those "grouped" policy numbers to show results below? The "kicker" is I'd like to use the query design view in Access (not paste and copy SQL)... e.g. trans 1, policy number abc trans 2, policy number abc trans 1, policy number xyz Results = 2 Policy numbers (not 3) |
#3
|
|||
|
|||
Count Group By
Hi,
Make first a saved query, q1, out of your GROUP BY query, then, make a second query: SELECT COUNT(*) FROM q1 You just count the number of records returned by the first query, which is what it seems you seek. Hoping it may help, Vanderghast, Access MVP "Patrick" wrote in message ... I have a table of transactions for multiple iterations of the same policy number. The Group By function works to LIST the distinct policy numbers, but how do I COUNT those "grouped" policy numbers to show results below? The "kicker" is I'd like to use the query design view in Access (not paste and copy SQL)... e.g. trans 1, policy number abc trans 2, policy number abc trans 1, policy number xyz Results = 2 Policy numbers (not 3) |
Thread Tools | |
Display Modes | |
|
|