locked
Getting a page footer sum from several dsum group footer items RRS feed

  • Question

  • I have a working calculation in a group footer but can not get it to work in the page footer.

    In the report there is no detail items, only a footer for the group [picker number] . In those groups the following works: 

    =dsum ("[hours]","picker_tally","[day]=dateadd (`d`,1,#"&[pay period start date]&"#) and [picker number]=[text8]")

    The report lists 24 groups on a page and I need totals for each  in the page footer.

    =dsum ("[hours]","picker_tally","[day]=dateadd (`d`,1,#"&[pay period start date]&"#)")

    Gets me a grand total for that day, not a page total

    Thursday, July 14, 2016 6:58 PM

Answers

  • I don't think that's possible with DSum, unless you could somehow specify in the third argument exactly which items are on page N. That seems really hard to do.

    Running Sum may not work either, because it is also at the group level (or report as a whole), but worth a quick test.

    How about the Page Footer's OnFormat event? Maybe combined with the Detail section's OnFormat event? The latter would be called for each row, then you can sum the values and put them in a textbox in the former.


    -Tom. Microsoft Access MVP

    Thursday, July 14, 2016 9:59 PM