View Full Version : How to do Sum from a group of Amount???


alexkong2003
09-10-2006, 07:20 PM
Hi all,

I have a question here... I have a report that showing a sub total that base on few amount like (CourseFee + TravelFee + Accomodation + Others), Then how to do the Grant Total base on the Sum function that return from these amount?? (I had do it with the ordinary Sum(CourseFee + TravelFee + Accomodation + Others) but it show the wrong record with the total of whole db record. I do try to using the DSum as well but the total is not right too...

Thank you.

Regard,
alex

Ron_dK
09-10-2006, 10:55 PM
You'll have to create a field with something like :

Total: DSum("[Coursefee]","Yourtable”,"") + DSum("[Travelfee]","Yourtable","") + DSum("[Accomodation]","Yourtable","")


Hth

alexkong2003
09-11-2006, 01:01 AM
Thank you for the reply rak~~~ i had try it but it not works... the report just poping out the error message of syntax error missing operator.... Do u have any others suggestion ???

Thank you!

Ron_dK
09-11-2006, 01:09 AM
How are your subtotals for CourseFee , TravelFee , Accomodation , others generated. Is that done on the basis of a query or unbound textbox .
If you provide us with some more info, I'll see what changes are to be made.

Btw are all the *Fee fields numeric ?

Rich
09-11-2006, 01:12 AM
Your Sum belongs in the GroupFooter

alexkong2003
09-12-2006, 05:16 PM
Thanks everyone~ I could solve my problem already ... actually why i got syntax error is because i copy the whole task and paste to the access... when i type it myself then the problem was solve! so i think is because of the encode problem between access and IE... Now i had learn a lesson.

Thanks anyway~