467,211 Members | 1,202 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,211 developers. It's quick & easy.

Sum totals in columns

I have a main form with a subform on it. The subforms columns are Qty , Part # , Description , Unit Price , and Ext Price. I put a text box on my main form named Total. I got the ext price to add up right from multiplying the qty by the unit price, but I cannot figure out how to total up the ext price column from all the rows and have it show in the total text box. I have it set to currency. I tried =Sum , Sum, =SUM but I still cannot get it to put a value in the total text box. I currently have in the totals textbox ....... =Sum[PartsInventoryTable1subform].Form![ExtPrice]. Am I using the right syntax here?
Apr 16 '08 #1
  • viewed: 1825
Share:
2 Replies
Expert 256MB
I have a main form with a subform on it. The subforms columns are Qty , Part # , Description , Unit Price , and Ext Price. I put a text box on my main form named Total. I got the ext price to add up right from multiplying the qty by the unit price, but I cannot figure out how to total up the ext price column from all the rows and have it show in the total text box. I have it set to currency. I tried =Sum , Sum, =SUM but I still cannot get it to put a value in the total text box. I currently have in the totals textbox ....... =Sum[PartsInventoryTable1subform].Form![ExtPrice]. Am I using the right syntax here?
No that is NOT the correct syntax.

You have to understand that the SUM function is a function. Since it is a function all options that are used in a function need to be enclosed in ().

Example:

Expand|Select|Wrap|Line Numbers
  1. =DSum("ExtPrice","TableName","[OrderID] = SomeNumericValue")
  2.  
Apr 16 '08 #2
Ok I put in =DSum("ExtPrice","PartsInventoryTable1.subform"). That is returning an error in the textbox. What is the somenumeric value and the brackets around the orderid for? I also put that in the control source, is that the right place?
Apr 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Darren | last post: by
3 posts views Thread by mark | last post: by
2 posts views Thread by Amac | last post: by
10 posts views Thread by rdemyan via AccessMonster.com | last post: by
3 posts views Thread by =?Utf-8?B?Um9iZXJ0IENoYXBtYW4=?= | last post: by
9 posts views Thread by JJM0926 | last post: by
5 posts views Thread by colin spalding | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.