Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Feeding Sum textbox to subform
Asteropi Papadopoulou 
   
2 years ago
I've been following the invoicing video and so far I have recreated it to a very good degree. However, I run into yet another problem.
In the OrderDetails subform we set a textbox to calculate the sum of all the products.
Then in the CustomerF, we have the OrderList_subform

I need in my Orderlist to have a field that draws this Sum textbox from the OrderDetails subform.
I tried to set the resource to =Forms!Mainform!Subform1.Form!ControlName command, but it doesn't seem to work. I get either #Error or Name? every time I try a variation of the sort.
Any insights?
Kevin Yip  @Reply  
     
2 years ago
They need to be actual form names, as shown on your navigation pane, most likely not Mainform or Subform1.  Also, Access will automatically enclose everything with square brackets.  E.g.:

     =[Forms]![Actual main form name]![Actual subform name].[Form]![Actual control name]

If this is used on the main form, no need to reference the main form:

     =[Actual subform name].[Form]![Actual control name]
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
Hey thank you
Of course I know I had to change the names. I just gave the command as is so you know which one I was usng.
This goes from OrderDetails_Subform (on OrderF) to OrderList_Subform (on CustomerF).

when I try this: =[Actual subform name].[Form]![Actual control name]
which is really this =[OrderDetailsF].[OrdersF]![Sum]
I get the Name? error
Kevin Yip  @Reply  
     
2 years ago
"[Form]" should be literally "[Form]":

     =[OrderDetailsF].[Form]![Sum]

You may also want to name your control something else other than "Sum," which is a reserved word in Access.
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
I have named it something greek, I just gave you those words so we can understand each other :D
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
Anything I have tried doesn't work to pull something from a subform :(
What else can I try? Is there another command?
David Burns  @Reply  
    
2 years ago
Asteropi Hi
To avoid confusion, it may be better that you post the actual words you've used in Access.
Kevin Robertson  @Reply  
          
2 years ago
Is the OrderF open?. If the form isn't open Access won't be able to retrieve the value using this method.
Try using DSum instead.

Something like this:
    =Nz(DSum("ExtPrice","OrderDetailQ","OrderID=" & [OrderID]),0)
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
@Kevin
Ah I see. No I had the order list in the CustomerF, and from that Order list, I pressed what I wanted and went to the Order, Form.
I'll do it as you ask.

@David
If you don't speak Greek, you won't understand unfortunately. But I wrote what I told you, just with greek names, so Sum is Σύνολο, not a reserved word. Anyway, thank you. I guess the problem was I didn't have the form open. I'll try Kevin's way and see what happens :D
Richard Rost  @Reply  
          
2 years ago
This is why screen shots are sometimes better. Greek letters don't work here. :(
David Burns  @Reply  
    
2 years ago
Asteropi Hi
I use lots of Greek letters everyday but only individually. Put them together to make a word and, you're right, I'd be stuck :o))
As Richard says, how about a screen shot or two?
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
Hey everyone,
I used the Dsum command as Kevin suggested and now it's running properly. Thank you all

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: 8/7/2026 11:29:37 PM. PLT: 1s