By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,337 Members | 2,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,337 IT Pros & Developers. It's quick & easy.

Adding multiple totals

P: 7
This is so frustrating becuase i know this has a simple solution, but i just cant get it to work!

Basically i have several subforms on a page (continuous forms) and they all have a simple sum function in a text box. sum=([quantity]).

I now want to add all the totals and display them on the page in a text box.

I've been trying to use the expression bulider but i cant get it to work.
Mar 13 '08 #1
Share this Question
Share on Google+
1 Reply


Expert Mod 2.5K+
P: 2,545
Basically i have several subforms on a page (continuous forms) and they all have a simple sum function in a text box. sum=([quantity]).

I now want to add all the totals and display them on the page in a text box...
In the unbound text box that is to hold all the totals you should be able to add the following as the control source, substituting for the subform name and each control's name as appropriate:
Expand|Select|Wrap|Line Numbers
  1. =Me![subformname].form![ControlTotalName1] + Me![subformname].form![ControlTotalName2] + ...
This simply adds the values in each of the specified controls; if one of them is null this would fail. If a null value is at all likely then use the Nz function accordingly:
Expand|Select|Wrap|Line Numbers
  1. =Nz(Me![subformname].form![ControlTotalName1],0) + Nz(Me![subformname].form![ControlTotalName2],0) + ...
I assume that your reference to the totals formula for your subform controls as sum=([quantity]) is just a typo, and that you meant
=sum([quantity]) instead.

-Stewart
Mar 13 '08 #2

Post your reply

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