Sum function

  • Thread starter Thread starter magix
  • Start date Start date
M

magix

I've got several forms with numbers on them, and I want to put a total of the
numbers on one form. IE:

Form1: $ in toys = 500
Form2: $ in books = 500

And form3 would be Total Amount all together from Form1 & Form2
 
magix,
On Form3 you would refer to the other open form values as using 2
calculated text controls...
TotalToys
= Forms!frmFormOne!TotToys
and
TotalBooks
=Forms!frmFormTwo!TotBooks

and one more calculated field to sum them...
TotalAll
= TotalToys + TotalBooks
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
if you're wanting to *display* at total on form3, you can use an unbound
textbox control, entering the following in its' ControlSource property, as

=Forms!Form1!NameOfNumberControl + Forms!Form2!NameOfNumberControl

replace both instances of NameOfNumberControl with the correct name of that
control on the corresponding form.

if you're wanting to *store* the total...well, first of all you couldn't
store it in a form, you can only store data in a table. and second, the rule
of thumb is to *not* store calculated data in a table, but rather just
calculate and display it as needed in forms and reports.

hth
 
magix,
The #Name error occurs when Access does not find an object referred to in
the calculation.

frmMoney must be open while form3 is open.

What is the name of the field on frmMoney that contains the Toy total?
(try to use a descriptive name like ToyTotals, instead of just Totals)
Is that totals field on the main form, or a subform?
If on a subform, what is that subform Name?

What is the name of the calculated field on Form3 that has
=Forms!frmMoney!Total
as the control source?
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Back
Top