Sum

  • Thread starter Thread starter accessuser via AccessMonster.com
  • Start date Start date
A

accessuser via AccessMonster.com

I dont know what i am doing wrong, can someone explain the following to me.
I have some caculation in the forms, but those # didn't feedback to the main
table, why is that? Is there anyway to make this work? and how do i
calculate Sum of another Sum.

TotalCost
=[CourseCost]+[BookCost]

YearTotal
=Sum([TotalCost])

Thanks!
 
accessuser via AccessMonster.com said:
I dont know what i am doing wrong, can someone explain the following to me.
I have some caculation in the forms, but those # didn't feedback to the main
table, why is that? Is there anyway to make this work? and how do i
calculate Sum of another Sum.

TotalCost
=[CourseCost]+[BookCost]

YearTotal
=Sum([TotalCost])

Calculations are not supposed to be stored in tables. If your table has the
field [CourseCost] and the field [BookCost] then you can derive the TotalCost
any time you need by doing exactly what you are doing on your form.

If you don't want to create that expression over and over then build a query
based on your table, do the calculation in the query as a derived field and then
use the query every place you would otherwise have used the table.
 
I dont know what i am doing wrong, can someone explain the following to me.
I have some caculation in the forms, but those # didn't feedback to the main
table, why is that? Is there anyway to make this work? and how do i
calculate Sum of another Sum.

TotalCost
=[CourseCost]+[BookCost]

YearTotal
=Sum([TotalCost])

Thanks!

Read Rick's good advice on the first question; to calculate the sum of
a calculated field, redo the calculation:

=Sum([CourseCost] + [BookCost])

or, if either might be NULL,

=Sum(NZ([CourseCost]) + NZ([BookCost]))

John W. Vinson[MVP]
 
Thanks Rick and John. I like the query advice. I created a query for that
and it worked out really well.

I appreciate all your help!!

John said:
I dont know what i am doing wrong, can someone explain the following to me.
I have some caculation in the forms, but those # didn't feedback to the main
[quoted text clipped - 8 lines]

Read Rick's good advice on the first question; to calculate the sum of
a calculated field, redo the calculation:

=Sum([CourseCost] + [BookCost])

or, if either might be NULL,

=Sum(NZ([CourseCost]) + NZ([BookCost]))

John W. Vinson[MVP]
 
Back
Top