Dear Gurus
BACKGROUND:
Client database for which weekly contact sheets are generated via an Access Report. The Report contains a case note history in the form of a subreport populated by a query. The Sub report is in the bottom half of the detail section of the report. The sub report for the casenotes is set to Can Grow to allow all case notes to appear. Those case notes may then spill over to a second page.
ISSUE:
In an effort to reduce our environmental impact I am trying to have these reports duplex print. The following code activates a page break control placed in the page footer of the report so that if the case notes don't actually spill over to Page 2 it will generate a blank page thus re-aligning the new record with with a new duplex-printed sheet(acknowledgement to Balaji Ramanathan @ UtterAccess for the original code).
duplex printing is triggered on the open event of the report and reset on close.
For records that have up to a maximum of two pages this code works fine. On the rare occasion, however, case notes may spill over to a third page. On these occasions the code will not insert a blank page at page 4 and instead prints the first page of the next record on the reverse side of the third page of the previous record. As these records need to be filed indvidually I can't have data for two records on the same sheet of paper.
I've tried experimenting with additional page breaks, looking to see where PrintCount is - both on its own and in comparison to Me.Page - but to no avail.
I Look forward to your suggestions.
Xentaur
BACKGROUND:
Client database for which weekly contact sheets are generated via an Access Report. The Report contains a case note history in the form of a subreport populated by a query. The Sub report is in the bottom half of the detail section of the report. The sub report for the casenotes is set to Can Grow to allow all case notes to appear. Those case notes may then spill over to a second page.
ISSUE:
In an effort to reduce our environmental impact I am trying to have these reports duplex print. The following code activates a page break control placed in the page footer of the report so that if the case notes don't actually spill over to Page 2 it will generate a blank page thus re-aligning the new record with with a new duplex-printed sheet(acknowledgement to Balaji Ramanathan @ UtterAccess for the original code).
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.Page Mod 2 = 0 Then
Me.PgBrk01.Visible = True
Else
Me.PgBrk01.Visible = False
End If
End Sub
duplex printing is triggered on the open event of the report and reset on close.
For records that have up to a maximum of two pages this code works fine. On the rare occasion, however, case notes may spill over to a third page. On these occasions the code will not insert a blank page at page 4 and instead prints the first page of the next record on the reverse side of the third page of the previous record. As these records need to be filed indvidually I can't have data for two records on the same sheet of paper.
I've tried experimenting with additional page breaks, looking to see where PrintCount is - both on its own and in comparison to Me.Page - but to no avail.
I Look forward to your suggestions.
Xentaur