Results 1 to 7 of 7

030204, 11:33 #1Registered User
 Join Date
 Mar 2004
 Posts
 10
Unanswered: Anyone can help me with calculating total in Acess?
I'll send you the sample database. Please help!!

030204, 11:43 #2Registered User
 Join Date
 Nov 2003
 Posts
 267
How big is it?
S

030204, 11:49 #3Registered User
 Join Date
 Mar 2004
 Posts
 10
Originally posted by sbaxter
How big is it?
S

030204, 12:10 #4Registered User
 Join Date
 Mar 2004
 Posts
 10
Here is the database
Go to report, summary, if you take look at the yellow line and gray line. some of the calculation is not right, example: go to 22329, the total should be 49,267+100,000 =149,267, but now it's 49,267+49,267+100,000. Is it possible to write some code behind it??

030204, 12:41 #5Registered User
 Join Date
 Mar 2004
 Posts
 10
Re: Here is the database
Originally posted by luckyrl
Go to report, summary, if you take look at the yellow line and gray line. some of the calculation is not right, example: go to 22329, the total should be 49,267+100,000 =149,267, but now it's 49,267+49,267+100,000. Is it possible to write some code behind it??

030204, 13:16 #6Registered User
 Join Date
 Jan 2004
 Location
 Kennesaw, Ga
 Posts
 20
Re: Here is the database
Originally posted by luckyrl
ANYONE??
=Sum([rptComm])Max([SumComm])
You can look at the report in design and then get the properties on that individual field.
The report is based off of qryCostTotal
Looking at the qryCostTotal for Funds Center 22329, it appears to be taking the total from the rptComm column which is $298,534.54 and subtracting the max value from the SumComm which is $100,000.00.
To get the correct value that you may be looking for you would change the formula so that it is as follows:
=Sum([rptComm])Sum([SumComm])
HTH

030204, 14:00 #7Registered User
 Join Date
 Mar 2004
 Posts
 10
Re: Here is the database
Originally posted by agduga
The formula for the total in the grey section is as follows:
=Sum([rptComm])Max([SumComm])
You can look at the report in design and then get the properties on that individual field.
The report is based off of qryCostTotal
Looking at the qryCostTotal for Funds Center 22329, it appears to be taking the total from the rptComm column which is $298,534.54 and subtracting the max value from the SumComm which is $100,000.00.
To get the correct value that you may be looking for you would change the formula so that it is as follows:
=Sum([rptComm])Sum([SumComm])
HTH
I've tried Sum([rptComm])Sum([SumComm]), 22329's total is correct with this formular, however, others' total are not correct, their total become negative, since Sum([SumComm]) is sum of the sum. I think the problem with 22329 is because it has 2 different [SumComm] values since it groups by Fund(It's what I want, group by fund). The calculation is only subtracting one [SumComm] (It should subtract all of [sumComm]. (the valuce [SumComm] is from another query, it's sum of all items under ALLOTHERS). So I don't know if there is a way to solve this problem?
Thanks!