Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   Report Sum totals (https://www.askmehelpdesk.com/showthread.php?t=472272)

  • May 21, 2010, 11:20 AM
    mcleyn
    Report Sum totals
    Hi there,

    I have made a report from a query. I want to sum the totals from a totals column. I have had luck summing the totals from my other columnms by putting a text box control source to =sum(Name) of the appropriate textbox. However for this column I use the same expression =sum(Name) however I get "Enter Parameter Value" when I run the report.

    Does it have to do with the fact that my totals column in the report comes from a calculation field done in the query?
  • May 21, 2010, 12:15 PM
    ScottGem

    When Access prompts you for a parameter value it is finding a name it can't resolve so it assumes you want to enter it as a parameter. Usually this occurs when you are misspelling the object name. So the first thing to check is the object name.
  • May 21, 2010, 12:19 PM
    mcleyn
    Quote:

    Originally Posted by ScottGem View Post
    When Access prompts you for a parameter value it is finding a name it can't resolve so it assumes you want to enter it as a parameter. usually this occurs when you are misspelling the object name. So the first thing to check is the object name.


    I have triple-checked the object name and both are correct.
    What else is do you think the problem may be?
  • May 21, 2010, 01:12 PM
    ScottGem

    Are you summing the column name from the query or the control name on the form?
  • May 25, 2010, 07:30 AM
    mcleyn
    Quote:

    Originally Posted by ScottGem View Post
    Are you summing the column name from the query or the control name on the form?

    Both names are the same.
    In the query I have made a column called Total Funding Requested which adds funds over four years.
    In the detail part of my form I have a Total Funding Requested text boxes which collect the values from my query. Then in the appropriate footer I put in a textbox and under the control source I use the expression =Sum(TotalFundingRequested) but I get "Enter Parameter Value" for Total Funding Requested.
    Perhaps it is the expression that is wrong?
  • May 25, 2010, 08:12 AM
    ScottGem

    First, does the name have spaces in it? Your SUM() doesn't. Also try:
    =Sum([TotalFundingRequested])
  • May 25, 2010, 08:19 AM
    mcleyn
    Quote:

    Originally Posted by ScottGem View Post
    First, does the name have spaces in it? Your SUM() doesn't. Also try:
    =Sum([TotalFundingRequested])

    Wow! Thank you so much ScottGem. My query column that I made had spaces in the name which was why it was not working. I did not know such a small thing could make such a big problem. Thank you!
  • May 25, 2010, 09:16 AM
    ScottGem
    Quote:

    Originally Posted by mcleyn View Post
    I did not know such a small thing could make such a big problem. Thank you!

    One should NEVER use spaces in object names. This will often come back to haunt you as it has done here. Either use camel notation:

    TotalFundingRequested

    Or underscores:

    Total_Funding_Requested

  • All times are GMT -7. The time now is 01:56 AM.