Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2011
    Posts
    19

    Unanswered: Access Reporting Summing a Row

    Hi Everyone,

    I'm working on an Invoicing database, I'm trying to get a sum of 3 field (Goods, Installation, transportation) for every record. I added a text box, to the detail section of the report, and added the following formulas:

    =sum(Goods)+(Installation)+(transportation)

    but the total being returned makes no sense.

    Thanks,

    Anthony

  2. #2
    Join Date
    Jul 2009
    Posts
    38

    Summing a Row

    Anthony,

    Just had a quick look at reports I made many months ago and I also added a textbox but in the footer. The code I used was:

    =Sum([hours]*[Cost])

    The difference besides location is the use of []

    Nige

  3. #3
    Join Date
    Oct 2011
    Posts
    19
    I don't think that's correct, I just tried it and that gives me the the grand total for all the value on the report no just one row.

    "total of all the goods" + "total of all the Installations" + "total of all the transportation"

    If I put it in the footer then that doesn't give it to me per row

  4. #4
    Join Date
    Jul 2009
    Posts
    38

    Summing

    Sorry, misled you.

    I was not telling you where to put the text box, purely that the syntax appeared wrong in that you were not using square brackets.

    I just opened a report and added a text box to sum different text boxes for each row and it worked fine, but it needs the [] brackets.

    Yours should look something like:

    = Sum ([total of all the goods] + [total of all the Installations] + [total of all the transportation])

  5. #5
    Join Date
    Oct 2011
    Posts
    19
    Here's the file with the actual names (direct cut and past from the control source):

    =Sum([cost of goods]+[installation cost]+[transportation cost])

    When I add this in the control source the total returned is the grand total; in other words:

    sum of all good + sum of all installations + sum of all transportation

    it returns $594,540.79 next to every row

  6. #6
    Join Date
    Jul 2009
    Posts
    38

    Remove Sum

    Anthony,

    Just remove the Sum so you then have:

    =([cost of goods]+[installation cost]+[transportation cost])

    Nige

  7. #7
    Join Date
    Oct 2011
    Posts
    19
    Thanks you!!!!

    I feel really stupid right about now!

  8. #8
    Join Date
    Jul 2009
    Posts
    38

    Stupid!!

    So do I.

    I was hooked onto the missing [] brackets instead of checking the remainder of the statement.

    Nigel

Posting Permissions

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