View Full Version : Report Sum totals
mcleyn
May 21, 2010, 11:20 AM
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?
ScottGem
May 21, 2010, 12:15 PM
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.
mcleyn
May 21, 2010, 12:19 PM
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?
ScottGem
May 21, 2010, 01:12 PM
Are you summing the column name from the query or the control name on the form?
mcleyn
May 25, 2010, 07:30 AM
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?
ScottGem
May 25, 2010, 08:12 AM
First, does the name have spaces in it? Your SUM() doesn't. Also try:
=Sum([TotalFundingRequested])
mcleyn
May 25, 2010, 08:19 AM
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!
ScottGem
May 25, 2010, 09:16 AM
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