Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009

    Unanswered: Text Box Calculating a Text Box Calculation?

    I have several lines in report detail that are added then compared to a minimum commission rate. So if a+b+c>MinComm then the group total is a+b+c else it's MinComm.

    I've got this figured out (more or less) but now I need the sum of these groups and want to calculate/sum the previous results (a+b+c or MinComm) which are a combination of the the results.

    I've tried Sum([Reports]![ReportName]![TextBoxName]) to no avail. Is there a way to do this?

    I've tried this in the query but am at a loss as to how to create the a+b+c calculation to compare to MinComm.

    Thanks in advance for any help!

  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    You can't sum a calculated control. Presuming you used an IIf() function for it, you can sum that:


  3. #3
    Join Date
    Jul 2009
    Unfortunately, I don't think I can because the IIF statement has aggregates like so: =IIf([MinComm]>Sum([EarnedComm]),[MinComm],Sum([EarnedComm])).

    This has got me stumped. sigh

  4. #4
    Join Date
    Nov 2007
    Adelaide, South Australia
    If you want to sum it, it MUST be done at the query level, not the form or report level... you can try to fiddle it to make it work without doing so by using hidden controls and the RunningSum property, but I find that clunky and difficult to maintain, so I don't recommend it.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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