Hello all,
I have a form that the user can update info on their clients. What they wanted to be able to do is print individual labels from this form, so I thru a checkbox on the form with a button that when clicked would print these labels if the box was checked. The other twist was that they could also choose how many labels to skip on a full sheet of labels so that they could reuse the sheet and how many of each label to print. Well when the user chooses zero labels to skip (starting from the 1st label on the sheet) I get "Run Time error 2427 you entered an expression that has no value. The expression may refer to an object that has no value, such as a form, a report, or a label control." When I debug, the first If Printcount line is highlighted but I can't figure out what is causing it. Hope this makes sense. Here's my code. Any suggestions would be great.
Static Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim 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
Any help would be appreciated.
Thanks in Advance.
Paul
I have a form that the user can update info on their clients. What they wanted to be able to do is print individual labels from this form, so I thru a checkbox on the form with a button that when clicked would print these labels if the box was checked. The other twist was that they could also choose how many labels to skip on a full sheet of labels so that they could reuse the sheet and how many of each label to print. Well when the user chooses zero labels to skip (starting from the 1st label on the sheet) I get "Run Time error 2427 you entered an expression that has no value. The expression may refer to an object that has no value, such as a form, a report, or a label control." When I debug, the first If Printcount line is highlighted but I can't figure out what is causing it. Hope this makes sense. Here's my code. Any suggestions would be great.
Static Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim 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
Any help would be appreciated.
Thanks in Advance.
Paul