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 
Nested Subform
William Dowler 
      
6 years ago
Hi Richard,
I have a form (Customer) that has a subform (Project) which itself has a subform (Material) which is a continuous form. I sum the Material Price in the footer of the Material subform but of course this is not visible when viewing the nested forms. I want to show the total $$ for Materials on the Project form in a textbox and have it update each time a MaterialAmount is entered (or updated) on the Material subform but I can't seem to get that to work. I could do it if there were only two levels (Parent form and subform) but not when there are three. What do I put in the ControlSource for the text box on the Project subform? Many thanks....
Richard Rost  @Reply  
          
6 years ago
It shouldn't matter whether the subform is nested or not. In your MaterialF subform, make a SumMaterialPrice field which will be =SUM(MaterialPrice). Now that's on the innermost subform. Above that in the Project for, you would make a text box with a control source of: =MaterialF!SumMaterialPrice

Make sure everything is named correctly and it should work. If you don't want to SEE that SUM in the MaterialF that's fine. Make it invisible, but you'll need it there to calculate the value AND you'll probably need a Me.Requery in the AfterUpdate event for the innermost subform so it gets refreshed when you add new values.

If you can't get it working let me know. I can make a TechHelp video about this. Haven't covered it yet.
William Dowler OP  @Reply  
      
6 years ago
Richard,
"Above that in the Project for, you would make a text box with a control source of: =MaterialF!SumMaterialPrice"
This gives me an error of MaterialF not found.
Isn't MaterialF a control on the Project form that needs to be referenced as such?
William Dowler OP  @Reply  
      
6 years ago
Richard,
Ignore my last reply.
Your solution works just fine. I had a senior moment!!!
Richard Rost  @Reply  
          
6 years ago
Yes, indeed. MaterialF would be the name of the subform OBJECT on your ProjectF in my scenario. Just like OrderDetailF is a subform OBJECT inside of OrderF. Glad you got it working.

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 7:44:42 AM. PLT: 1s