Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    May 2004
    Posts
    45

    Unanswered: Running a Sum in a Form?!?!

    Is there a way to effectively run a Sum of a column in a form?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    =sum(column)

    in the form footer

    That's making a general assumption that you're using continious forms, since you haven't provided any detail at all about what you actually need to do.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    May 2004
    Posts
    45
    Thank you
    I will try that right now, to see how it works

    Thanks again

  4. #4
    Join Date
    May 2004
    Posts
    45
    Well I am using continuous form, every day we count our register, and at the end of the day when we recount it, we input it into the form, and it makes all the calculations for the checks credit cards, and takes all that and subtracts the invoice total from it, to see if we are short or over.
    And I would like to put a running total of money collected in the register and invoice totals so we can see how it equals out.

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Right-o, the aformentioned method should do the trick for you then.

    Form sections act very similarly to reports, so you can do a lot of the same stuff. Summing columns is one of those similarities.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    May 2004
    Posts
    45
    When I put in control source =sum(Invoice Total)
    I have a "The Expression you have entered contains a invalid syntax. You may have entered a operand without a operator." error

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    =sum([Invoice Total])

    Without brackets, the space makes access think you're trying to pass two arguments: Invoice, and then Total to Sum(), it doesn't like that. Brackets identify the entire thing as one field.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    May 2004
    Posts
    45
    Thank you very much I have it working. Works pretty good too.

    Will this work on a field that has calculations in it. Like I have in my Registers Total field I have =[Pennies]+[Nickels]+ etc... and all that adds up just fine. Will Sum work on that field, or not because it is a calculated field?

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    No, you cannot sum a calculated field. You can, however, sum the calculations.

    Eg

    Sum(pennies + nickels + etc)
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  10. #10
    Join Date
    May 2004
    Posts
    45
    Thank you very much for replying quickly.
    I will have to keep trying on the sum thing. I am very new to this, and it was a wonder that I even was able to get a form running doing what I needed it to do.
    I have tried to run a sum in form footer doing the Sum(pennies + nickels + dimes) and it didn't work, and I tried it like =Sum(pennies + + nickels + dimes)
    it didn't work,
    I also tried =Sum([Pennies]+[Nickels]+[Dimes]) and it didn't work either

    I am not sure what I am doing wrong..

  11. #11
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Could you post the underlying query?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  12. #12
    Join Date
    May 2004
    Posts
    45
    Well, this my last attempt at trying to figure it out

    =Sum([Text72]+[Text74])

    this is what I was putting in control source the last time I did it
    I left it with the default Text label because it was just a simple form
    The other time I tried
    =Sum(Text72 + Text74)
    Then I tried
    Sum(Text72 + Text74)

    Then I tried
    =Sum([Text72]+[Text74])
    I get an #error in the field when I try all these

  13. #13
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Please post the underlying sql query.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  14. #14
    Join Date
    May 2004
    Posts
    45
    I apologize for not knowing, but where can I get this query for you?

  15. #15
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    it's the "recordsource" property in the data tab of the form.

    If it's pointing only at a table, then the table structure will be fine.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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