G
Guest
Hello all,
I've the following code running in the Detail Format section of my report.
It'll insert a page break when the [Day] field increments by 1. When i scroll
through the pages of my report the first time (in Print Preview), the code
runs and page breaks are inserted properly. Then i pressed Print and the
actual printout of my report has no page breaks in them!!! Please help! I
appreciate any inputs, thanks in advance!
Here is the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Static intA As Integer
Dim intB As Integer
intB = Me![Day] + 1
If intB = 3 And intA = 0 Then
Me![NewDay].Visible = True
intA = intA + 1
ElseIf intB = 4 And intA = 1 Then
Me![NewDay].Visible = True
intA = intA + 1
ElseIf intB = 5 And intA = 2 Then
Me![NewDay].Visible = True
intA = intA + 1
ElseIf intB = 6 And intA = 3 Then
Me![NewDay].Visible = True
intA = intA + 1
Else
Me![NewDay].Visible = False
End If
End Sub
I've the following code running in the Detail Format section of my report.
It'll insert a page break when the [Day] field increments by 1. When i scroll
through the pages of my report the first time (in Print Preview), the code
runs and page breaks are inserted properly. Then i pressed Print and the
actual printout of my report has no page breaks in them!!! Please help! I
appreciate any inputs, thanks in advance!
Here is the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Static intA As Integer
Dim intB As Integer
intB = Me![Day] + 1
If intB = 3 And intA = 0 Then
Me![NewDay].Visible = True
intA = intA + 1
ElseIf intB = 4 And intA = 1 Then
Me![NewDay].Visible = True
intA = intA + 1
ElseIf intB = 5 And intA = 2 Then
Me![NewDay].Visible = True
intA = intA + 1
ElseIf intB = 6 And intA = 3 Then
Me![NewDay].Visible = True
intA = intA + 1
Else
Me![NewDay].Visible = False
End If
End Sub