467,077 Members | 1,131 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

Adding multiple totals

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
  • viewed: 1113
Share:
1 Reply
Expert Mod 2GB
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.

Similar topics

7 posts views Thread by Billy Jacobs | last post: by
6 posts views Thread by jimfortune@compumarc.com | last post: by
22 posts views Thread by Drum2001 | last post: by
reply views Thread by chrisbenoit06 | last post: by
1 post views Thread by aayushi22@gmail.com | last post: by
11 posts views Thread by dennis.sprengers@gmail.com | last post: by
6 posts views Thread by santiago | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.