A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2006, 07:59 PM posted to microsoft.public.access.forms
accessuser via AccessMonster.com
external usenet poster
 
Posts: 66
Default Sum

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!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200612/1

  #2  
Old December 16th, 2006, 08:13 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Sum

"accessuser via AccessMonster.com" u28669@uwe wrote in message
news:6adc6ed89821a@uwe...
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.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com



  #3  
Old December 17th, 2006, 12:03 AM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default Sum

On Sat, 16 Dec 2006 19:59:37 GMT, "accessuser via AccessMonster.com"
u28669@uwe wrote:

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]
  #4  
Old December 17th, 2006, 12:46 AM posted to microsoft.public.access.forms
accessuser via AccessMonster.com
external usenet poster
 
Posts: 66
Default Sum

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 Vinson wrote:
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]

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]


--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.