473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Adding multiple totals

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
1 1237
Stewart Ross
2,545 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

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

Similar topics

7
by: Billy Jacobs | last post by:
I am using a datagrid to display some data. I need to create 2 header rows for this grid with columns of varying spans. In html it would be the following. <Table> <tr> <td colspan=8>Official...
6
by: jimfortune | last post by:
In: http://groups.google.com/group/comp.databases.ms-access/msg/60d7faa790c65db1 james.ea...@gmail.com said: :Ok, I've answered the first half of my own question. From a MSDN :article, I...
22
by: Drum2001 | last post by:
I have a table that tracks employee times. I have a column (Date/Time). Users, through a form, enter how long it takes them to complete a task. For example, 03:45 = 3 hours and 45 mins. I am...
0
by: chrisbenoit06 | last post by:
Howdy...anyone able to assist me in adding the function to calculate the gross pay, and also the calculation and printing of the totals of hours and gross pay....thoughts? /* Purpose: This...
1
by: aayushi22 | last post by:
Hi Need your expert help on the following i have a table with the following records EMP ID Req No Candidate name 1 candidate status 1 candidate name 2
11
by: dennis.sprengers | last post by:
Consider the following multi-dimensional array: --------------------------- $arr = array( array(3, 5, 7, 9), array(2, 4, 6, 8), array(1, 3, 5, 7) ); function add_arrays($arr) { for ($row =...
4
by: dponce | last post by:
Hello again, I have come across a brick wall in my database. I am looking for a Query to show me the combined information from multiple tables on one report. Each table has its own Query showing...
6
by: santiago | last post by:
I guess one cannot do this: arraytot = arraytot + arraydet; So, what's the trick to adding arrays like this? Thanks.
0
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.