Page Break by IF Else

FLCoderMike

Registered User.
Local time
Today, 06:55
Joined
Nov 14, 2007
Messages
29
I have a report that has to have a page break set for a specific number of years printed, these years are summed up in a column for each record, each record can have as few as 1 and up to 4 years in it, I then sum this column up in the report and get a number which I have in the report footer in a contrtol named yearCount, I have tried various formatting tricks like

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.yearCount = 50 Then
        Detail.ForceNewPage = 2   ' after section
    Else
        Detail.ForceNewPage = 0   ' none
    End If
End Sub

And similar; like setting a pagebreak visiblity to true or false based on the value of yearCount. This only causes the report to print single rows on the given number of pages, no good for me. What I need to do is have the report print out the records sum the yearCnt column and start a new page and a new yearCount for every 50 counted.

Any ideas?
 
i've just loooked in Access help and theres something called conditional pagebreak

it seems you can put a "perhaps" pagebreak in the detail of a report, and turn it on on demand

try that
 
If you have the year in a field that is a Date field, then you can group on that field and specify you want to group by Year, then you can set the interval to 50. This is all found in the sorting and grouping for a report.
 
I wish it were that simple, here's he scenario; Customers request the annual records for an applicant, these annual records can be from 1 to 4 years back from the current year. These requests are then faxed to a central clearing house on a batched form, so there are many requests from many customers on the same report all going at once. Problem is the clearing house has a limit on the amount of years per page that number is 50. I will attach a copy of the report so you have an idea of what I am saying. I have to count the number of years requested per request then once that number hits 50 or so (48 to about 54 is ok) I have to force a new page. This is the last thing that needs to be done.
 

Attachments

Users who are viewing this thread

Back
Top Bottom