In a data environment I write code like:
select ([exam fee]*[other fee]) as total from table1
then it work, but when I write like below it not work:
select sum[exam fee] as total from table1
what problem with it?

another thing. I write like:
"select sum[exam fee] as total , sum[other fee] as total_fee from table1"
it not work

Are the fields numeric? If not that could be your problem but without seeing your code who knows.


Good Luck

NOTE:

sum[exam fee]  ==>   sum([exam fee])

I don't understand by this code. I want sum[exam fee] and sum[other fee]. is it possible with your code?

I don't understand by this code. I want sum[exam fee] and sum[other fee]. is it possible with your code?

yes.
SUM is a sql function. you must use '(' & ')' for it.

change your code in this way:

"select sum[B]([/B][exam fee][B])[/B] as total , sum[B]([/B][other fee][B])[/B] as total_fee from table1"

thanks Mtb 925. it works well. another thing when I input exam fee in a form and when I see the report it not update. I mean exam fee is 200 and I add again 200. so report will show 400/ but it show 200, when I exit and again open the project then show 400. please help me

thanks Mtb 925. it works well. another thing when I input exam fee in a form and when I see the report it not update. I mean exam fee is 200 and I add again 200. so report will show 400/ but it show 200, when I exit and again open the project then show 400. please help me

Your welcome.

you must reconnect it. attach your sample. i will edit it.

you must reconnect it
reconnect mean......................

reconnect mean attach your code. :icon_wink:

This article has been dead for over six months. Start a new discussion instead.