Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Posts
    2

    Red face Unanswered: MS Access group calculation issue

    hi,

    I am running into a problem when I tried to have a sumation of the groups in an Access report.

    the issue is that I have a subtotal field called 'SubTotalCharge' that calculates the each induvidual total usage cost of a unit(group). The Data tab looks like following:

    =[SubPlanCost]+([SubOverage]*[SubOverage_Charge_KB])

    the problem is that each field above is a complex calculation by itself as well.
    for example, the [SubPlanCost] is actually:
    =IIf(IsNull([Discount_Plan_Cost]),[SubPlan Cost],[Discount_Plan_Cost])

    so when I tried to have a total of 'SubTotalCharge', it wouldn't give that but instead, it asked me for a value for 'SubTotalCharge', which mess me up.

    any body has any idea how can I get the correct calculation? or do I need to write code to control this?

    a million thanks in advance
    TB

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You can't sum a calculated control (which is what SubPlanCost is). Your 2 basic options are to recreate the calculation in the Sum function, or put a second hidden control in the detail with the same calculation and its running sum property set appropriately, and refer to that control in the footer.
    Paul

  3. #3
    Join Date
    May 2008
    Posts
    2
    Thank you so much Paul! I got it!

    Much appreciation!!!

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help. Welcome to the site by the way.
    Paul

Posting Permissions

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