Problem With Sum

Access_help_rob

Registered User.
Local time
Today, 06:08
Joined
Jul 3, 2003
Messages
66
Please help my report problem

Hey, ok heres my problem, i have a field in my report which shows the "sum" data in the fields, all this works fine and the report displays correct however. I then went to do a total of all the sum values so i enter in my report in a text box =Sum([My field]) and i keep getting Error# or sometimes Name? ive tried creating another querie which does this total and it displayd the total in the querie fine, i then try linking the text box to the querie, it links fine but then i get error again. In my report however it read something like this
CENTRE Hours
SM 330
PC
As 25
BB 50
BA
CC 12
CF

as you can see some of the data fields are blank which is correct could this maybe to do with why the total wont display of all these hours? i have also replaced these blank value with 0's and i still get the same error.
please help thank you
rob
 
Use the NZ function on all fields in your sum, this forces null fields to sum as zero.
 
Same problem with sum in footer. The numbers are correct in the detail section but when I try to sum in footer it gives me only the number in the last line....

What am I doing wrong?

My control source: =sum([earnedhours])
and I am asking it to sum over group (actually I have tried all 3)

Thanks
 
Well, actually I may have something else wrong....I was trying to sum on the page footer. The detail section has the minutes by pickerid and that is correct. So, I tried to sum all the minutes by the page footer....

Sometimes I get an #error and sometimes just the last line number, never the correct minutes summed.
 
You can't use Sum on the page footer, only group and report. There are work arounds in the help file, either using vba or the RunningSum property of a hidden textbox. Post back if you need more help
 
kind of the same problem with sum

I have a subreport which has all the dollar amounts I wanted to get the sum of. I created a bound object on the report so that I don't have to show the subreport. I did a =sum([Reports]![reportname]![ObjectID]) and it just comes out blank. I have it in the group footer.
 
You have to Sum the field in the subReportfooter and reference that field on the Main report
 
Just wanted to say "thanks" Rich, I got the sum to work in the report footer...probably where it should have been anyway...

Noreene
 
Rich said:
You have to Sum the field in the subReportfooter and reference that field on the Main report
Rich, I seem to be having a problem with referencing this field on the main report. I keep getting the #name? error or #error message. Can you help?
 
it's almost certainly a problem with referencing the subReport control, use the code builder to get the correct references
 
Rich said:
it's almost certainly a problem with referencing the subReport control, use the code builder to get the correct references
=[Reports]![SubRptGrantTrack]![1998] this is from code builder but the report is still showing the error message #name?
 

Users who are viewing this thread

Back
Top Bottom