[ACCESS 2003] REport: per page summary, total summary

Y

yupyupxav

Hello,


I'm presently developping a database keeping duty hours.
I have a table containing those hours in a date/time field (single
entries can never be more than 24h). In my reports, when I sum up the
timings, I use a "datetostring" function (VBA) to display timings

Now, I want to make a report displaying all records like

On top of page: Summary of my field with the total of all previous
pages.
The detail section : lines with next records.
Bottom of page:
- Summary with the sum of the page;
- Summary to the last record of this page (thus the summary found on
the top of page plus summary of this page) -> this number will have to
be found on top of next page, and so on...

What would be the procedure to achieve this?

Thanks,
Xav
 
M

Marshall Barton

yupyupxav said:
I'm presently developping a database keeping duty hours.
I have a table containing those hours in a date/time field (single
entries can never be more than 24h). In my reports, when I sum up the
timings, I use a "datetostring" function (VBA) to display timings

Now, I want to make a report displaying all records like

On top of page: Summary of my field with the total of all previous
pages.
The detail section : lines with next records.
Bottom of page:
- Summary with the sum of the page;
- Summary to the last record of this page (thus the summary found on
the top of page plus summary of this page) -> this number will have to
be found on top of next page, and so on...


Add a text box (named txtRunAmount) to the detail section.
Set its control source to the amount field and RunningSum
property to Over All

Set the page footer running total text box's expression to:
=txtRunAmount

Add a line of code to the report header section's Print
event:
Me.txtPageRunTotal = 0
where txtPageRunTotal is the name of the page header text
box that displays the same amount as the running total in
the previous page's footer.

Then add code to the page footer section's Print event:
Me.txtPageAmt = Me.txtRunAmount - Me.txtPageRunTotal
Me.txtPageRunTotal = Me.txtRunAmount
where txtPageAmt is the name of the page footer text box
that displays the page total.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top