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 
Forms Sub Total and Total
Taruna Matharu 

4 years ago
Hi Richard,

Can we have Subtotal in Form based on criteria. e.g. Fields are Project ID, Title, Document Type, Member Name, Member Share, Funding Amount. The Document Types are  three types JPP, JPA, CCR. When the type changes we get a sub-total for each type and at the end Total Cost?

Thanks
Taruna
Adam Schwanz  @Reply  
           
4 years ago
Sure, use an if/then statement in an AfterUpdate on the box that changes the type
Adam Schwanz  @Reply  
           
4 years ago
Or you can use an IIF Function but nested IIF can get complicated
Scott Axton  @Reply  
        
4 years ago
Taruna Matharu OP  @Reply  

4 years ago
Hello All,
I added this formula in Field DocumentType under AfterUpdate
=IIf([DocumentType]="JPP",Sum([MemberShare])) and also under Total Share.
It totals for each member however, I want it display all members shares for the JPP Document Type and their shares but at end sub total for Member Shares.
Taruna Matharu OP  @Reply  

4 years ago

Taruna Matharu OP  @Reply  

4 years ago

Adam Schwanz  @Reply  
           
4 years ago
Make an event out of that, don't just put it in there. If you click the ... to the right you can pick code builder and put it in there. But it looks like you have it in the wrong spot too. Are you using a combo box or anything to select when an item is JPP or another? If not, you'll want to put it in the on current event of the form itself. Can make it like this, you could put all the options into it even by added more elseifs

If DocumentType="JPP" Then
Text178 = SUM([MemberShare])
Elseif DocumentType="JPA1" Then
Text178 = 'insert other calculation here
End If
Taruna Matharu OP  @Reply  

4 years ago
Hi Adam,
I am not using combo box, data is pulled from query.  As per your If then statement I understand that if DocumentType is JPP or JPA then perform this calculation. What happens when DocumentType both JPP and JPA1 options are available for one project  In the Form where do I place the subtotal for JPP and JPA1 ? Just letting you know One project  can have both document types and one is contract second is extended contract. So once you select the Project no it display all contracts and share and funding..
Taruna Matharu OP  @Reply  

4 years ago

Taruna Matharu OP  @Reply  

4 years ago

Adam Schwanz  @Reply  
           
4 years ago
I must have misunderstand what you're trying to do. If you want to add all of them (JPP AND JPA1) then it should just be a sum of the fields in the query. Shouldn't need to do anything other than the SUM like you were.

If you want to list all of the members in the report, that can be done with the group and sorting settings. You could try and see if THIS explains it for you otherwise it's covered in expert 12.

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/6/2026 10:00:03 AM. PLT: 0s