Report Grouping Footer 'continued'

G

Guest

Here is the situation:

I have a report grouped by a transaction type. I would like the Grouping
Footer for each group to be able to list "continued from previous page" if
the GROUP falls over multiple pages.

For example, If group 1 has 3 records and all fit on page 1, the footer
would read "(3 batches)". If group 2 starts on page 1, has 50 records and
ends on page 2, I would like it to read "(50 batches, continued from previous
page)".

I know how to get it to count the batches, but I can't seem to figure out
how to have Access check what page the group started on and compare it to the
page the group ends on to determine if the group spans more than 1 page.

Any ideas? THX!
 
M

Marshall Barton

Robert_L_Ross said:
I have a report grouped by a transaction type. I would like the Grouping
Footer for each group to be able to list "continued from previous page" if
the GROUP falls over multiple pages.

For example, If group 1 has 3 records and all fit on page 1, the footer
would read "(3 batches)". If group 2 starts on page 1, has 50 records and
ends on page 2, I would like it to read "(50 batches, continued from previous
page)".

I know how to get it to count the batches, but I can't seem to figure out
how to have Access check what page the group started on and compare it to the
page the group ends on to determine if the group spans more than 1 page.



Add an unbound text box named txtGrpPage to the group header
section. In the section's Format event, add a line of code:

Me.txtGrpPage = Me.Page

Now, your group footer text box can use the expression:

="(" & Count(*) & " batches" & IIf(txtGrpPage < Page,
", continued from previous page", "") & ")"
 

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