Results 1 to 7 of 7
  1. #1
    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!!

  2. #2
    Join Date
    Nov 2003
    Posts
    267
    How big is it?

    S-

  3. #3
    Join Date
    Mar 2004
    Posts
    10
    Originally posted by sbaxter
    How big is it?

    S-
    500K

  4. #4
    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 22-329, 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??
    Attached Files Attached Files

  5. #5
    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 22-329, 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??
    ANYONE??

  6. #6
    Join Date
    Jan 2004
    Location
    Kennesaw, Ga
    Posts
    20

    Re: Here is the database

    Originally posted by luckyrl
    ANYONE??
    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 22-329, 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

  7. #7
    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 22-329, 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
    Thank you for your time!

    I've tried Sum([rptComm])-Sum([SumComm]), 22-329'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 22-329 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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •