Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Counting items across rows
Dan Dewey 
    
5 years ago
I am trying to count items in a row across several columns.  I tried the Totals" (Group By) function but I can't get the count correct.  Any suggestions?
Adam Schwanz  @Reply  
           
5 years ago
Your wording here is a little confusing. Just FYI when asking questions, easier to say fields not columns, records not rows.  Then you say you're using a totals groupby query? That would work with across several records (rows) not fields (columns).

So if your adding togethor a total number like money costs in different fields for ONE record, you can just use a calculated field in a query. FieldA + FieldB Calculated Fields

If you're trying to get a count of which fields in ONE record have a value vs which dont, you can use an IIF Statement to show if it has data or null, then DCOUNT that IIF statement.

If you're trying to add numbers going down a field across multiple records, same link I shared above should cover that with a footer calculation.

Dan Dewey OP  @Reply  
    
5 years ago
Adam,
Thanks for your quick response.  Sorry about the wording, I'm coming from the Excel world.  Yes, I want to count each field (that has a value) in a record and show that count in a "totals" field.  I am using a query as I need information from two different tables. You are suggesting that I use an IIF statement and then DCOUNT?  Isn't there an easier way to do this? If not, can you direct me to the video that explains how to use these functions?  Thanks!
Adam Schwanz  @Reply  
           
5 years ago
Yea I figured excel world :) no problem.  So just to verify, are you trying to get a count of fields that have a value? Field A has 5 in it, field B is null, and field C has 2 in it, so the COUNT would be 2, a count of fields that are being used and not null. Or are you looking for a SUM, FieldA + FieldB + FieldC so the answer you're looking for is 7?
Richard Rost  @Reply  
           
5 years ago
Can we see a sample of your data? Upload an image (above)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 2:23:17 AM. PLT: 0s