Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   Courses   Seminars   Templates   Help   TechHelp   Forums   Contact   Join   Order   Logon  
Access Tip: Report Grouping
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   10 years ago

I just posted a new video to the Tips section. It shows how to create multiple sorting and grouping levels in an Access 2010 report, complete with aggregate (sum) functions in the header or footer sections.

Count number of techs listed Upload Images   Link 
Elaine Heltman 
4 months ago
How do you count the number of TechIDs listed in the report? If Bob, Joe, and Mary are listed in the report, then the total TechIDs should be 3. But, I think because each TechID is related to a ServiceType, when you count via the grouped TechIDs, the total reflects the total ServiceTypes for that TechID because it counts every related instance. But I only want to see the number of techs listed in my report. Is this possible? Thanks.
Juan C Rivera
4 months ago
you have to get a field that seperates them, ie JobDescription.  in your query the criteria will be jobDescription = Tech result will be tech.  Then use the count([JobDescription])
Hope that helps.
Elaine Heltman
42 days ago
Sorry for not responding sooner, Juan. What I neglected to describe for my report, was that the report fields are from different related tables. I only want to count the TechIDs, regardless of the number of related service types. If I understand your suggestion, you want me to add a unique field to distinguish the TechIDs, but the IDs are already unique. Thank you for your help.
Juan C Rivera
41 days ago
Hello, take a look at Richards tech help video on helper files.  I use that video to set up my database where I have several individuals and based on qualifications fall into several positions.  like I have one that can perform service call, and filed work one name two diffrent jobs.  when I run a repoort to see who and how many do I have that can do a job the name will show.  In this report I will see the name 2 times in diffrnt section.  where as another may only do field work, then the name will only show one time.  in the report I use the =count([]) to add up the individuals.  I kinda tap dance around this question in hopes to hit a wider target in order to help you.  If you need more help we can work this out.  Willing to help always.

Elaine Heltman
41 days ago
Thanks, Juan. I'll give it a try!
Elaine Heltman
41 days ago
Thanks again, Juan. Helper Tables are great, but not for what I need. As I ask questions, I am slowly improving how I compose my question so I get the desired answer! I'll try again - the report is based on a query that combines information from 2 tables, say customers and orders, and the report is grouped by customers. Each customer has multiple orders. I want to show the total number of customers, counting each customer only once regardless of the number of their orders. Using =count([customerID]) returns the same number as =count(OrderID]), which is the grand total orders. I want the total customers. Thanks!
Scott Axton
41 days ago
It kind of sounds like you may need to change your grouping and sorting levels for your reports.
Check out this article that Richard posted some time ago and see if this doesn't help.

I see that you have started Developer levels so hopefully you also have gone through the Expert series.
Check out Expert 12 for detailed information on totaling in reports.

Hope that helps

Adam Schwanz
41 days ago
If you don't have many techs you could just make your own counter. If you do have a lot though, I think there's a SQL function called DISTINCT for queries that could perform this task. Not sure if Richard has covered it anywhere yet.
Kevin Robertson
41 days ago
I tried for ages to get the results you are looking for. The only way I could get it to work was with a SubReport.
I would imagine there are better solutions but this way is easy to implement.
Elaine Heltman
40 days ago
Adam, SELECT DISTINCT did the trick. Found it here with another member's fix: Thanks everyone!
Add a Reply

Show All Comments

Start a NEW Conversation
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.

You may want to read these articles from the 599CD News:

7/25/2021Missing Months
7/24/2021Center Vertically
7/22/2021Buy Access
7/21/202164-Bit Access
7/18/2021Splash Screen
7/11/2021Access Developer 30
7/11/2021Access Developer 31
7/11/2021Access Developer 31 Lessons

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Account Login
Online Theater
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: report sorting grouping aggregate sum header footer access tips  PermaLink