R
Randy
I have used the following code to print out labels based on a
suggestion in the archives, but I get an error message. "Can not find
object referred to"
The error refers to [SkipControl]= "Skip"
Can someone help me with this. Here is the code. I have also entered
the three controls in the report header plus have put a SELECT field in
the Record Source. I tested the select field and it just brings up the
selected records in the report when the code is left out so that is not
an issue.
Option Compare Database
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
intMyPrint = 0
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If
End Sub
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipContol] = "Skip"
Cancel = True
End Sub
suggestion in the archives, but I get an error message. "Can not find
object referred to"
The error refers to [SkipControl]= "Skip"
Can someone help me with this. Here is the code. I have also entered
the three controls in the report header plus have put a SELECT field in
the Record Source. I tested the select field and it just brings up the
selected records in the report when the code is left out so that is not
an issue.
Option Compare Database
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
intMyPrint = 0
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If
End Sub
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipContol] = "Skip"
Cancel = True
End Sub