I encountered a similar problems when I first started with Access which was the result of Nulls in the data.<br><br>Nulls are very tricky critters and can cause all manner of totaling and summing problems because a null in any field will produce a null result when totaling/summing rows and columns.<br><br>There is a built in function called Nz which will resolve that problem. Check it out in Access Help. I'd also suggest looking at Help for Nulls especially how to handle them in expressions.<br><br>Hope this helps. <p>Larry De Laruelle<br><a href=mailto:larry1de@yahoo.com>larry1de@yahoo.com</a><br><a href= > </a><br>
setting fields to have a default value of "0" is also helpful. that way you eliminate any new nulls. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
Thanks, but I don't think it is the nulls thing. I have everything set default to zero and I still get "#error" on all my sum totals. Any other ideas? Kate
Where you put the calculated text box is important--Access is quirky about placement. Are you trying to total a group<br>(put RecordSource "=Sum([thefield])" for a text box in the group footer. If you want totals for the entire report you have to put them in the report header or footer--the help contents of Advanced Reports are actually pretty instructive (imagine that!)
I am still wondering how to have a sum in every page, when I put the "=sum([field]) in page footer always appear "error". Does anyone have an answer ?
I have tried doing this aswell, but I don't think it's possible. I guess it doesn't support it.
It's not that I need it but a friend asked me how to do it, I tried to do a Sum([fieldname]) on the pagefooter and was amazed that it didn't work. I suppose that it's not an oftenly requested feature. As a matter a fact I've never been ask for page totals.
Try writting VB code to do it, i think it could be done. Nothing's impossible.
Dim dPageTotal As Double
Option Compare Database
--------------------------------------------------
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
dPageTotal = dPageTotal + Me.txtAmount
End Sub
--------------------------------------------------
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
Me.txtAmtTot = dPageTotal
dPageTotal = 0
End Sub
Let me explain.
First of all, I created a Global Variable dPageTotal, This is were I will keep my page total accumlating.
Next at each 'record print' I will add the total of txtAmount (one of the fields in the report) to my dPageTotal.
Finally, when the report reaches the end of the page to print the page footer I put dPageTotal into a Text Box txtAmtTot; this amount will be printed in the page footer. Then I reset dPageTotal to 0 again preparing it for the next page.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.