1. Open the report in design view.
2. Right-click the grey bar titled "Detail", and choose Properies.
3. Make sure the On Print property is set to:
[Event Procedure]
4. Do the same for the On Format property of the PageHeaderSection.
If that still doesn't work, press F9 on the first line of in sub (the
"IF..." line), and trace what's happening.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
LCalaway said:
Hi Allen:
I have entered the following code in my report -- it doesn't work. There
is
no other code behind the report. Any suggestions?
Option Compare Database
Option Explicit
Dim fBlankNext As Integer
Dim intLine As Integer
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
intLine = 0
fBlankNext = False
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then intLine = intLine + 1
If fBlankNext Then
Me.PrintSection = False
Me.NextRecord = False
fBlankNext = False
Else
Me.PrintSection = True
Me.NextRecord = True
fBlankNext = (intLine Mod 5 = 0)
End If
End Sub
Thank you.
LCalaway