D
DBenedict
Various reports started printing odd numbers of copies a few months back and
I'm not sure how to rectify the problem. I have multiple databases/reports
that have the same copy structure and all have this problem. Incidently,
this worked well for a couple years then something went wrong. Probably all
the upgrades to the network and/or Windows XP. We are now on SP3 with
Access 2003.
When a report runs, you are prompted for the number of labels you want.
Problem is, when I enter 1, I get one. When I enter 2, I get three. Then
everything 3 and above gives me one less label. So 3 gets me two, 4 gets me
three, 5 gets me four and so on. Its quite annoying!!!
Each report has a Text Box called [RepeatCounter] and its Control Source is
=[How many labels?]. In the Detail Section of the report, the OnPrint
property has this code.
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If IsNull([RepeatCounter]) Then
ElseIf intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End Sub
Why did this work for so long and is now acting up? How can I get it to
function again?
Some reports use a macro with the OpenReports action, View is Print and
Window Mode is Normal. Some reports use a button on a form with the line
DoCmd.OpenReport stDocName, acViewNormal.
I want it to be automated. I could change everything to Print Preview and
then <Ctrl>+<P> and select my own number of copies but that defeats the
purpose.
I had a few Combo Boxes that went blank and wouldn't show it results after
the SP3 upgrade but I fixed that with a Hot Fix for XP Service Pack 3. The
fix solved the Combo Box issue but did not help this problem.
Any ideas to fix this?
I'm not sure how to rectify the problem. I have multiple databases/reports
that have the same copy structure and all have this problem. Incidently,
this worked well for a couple years then something went wrong. Probably all
the upgrades to the network and/or Windows XP. We are now on SP3 with
Access 2003.
When a report runs, you are prompted for the number of labels you want.
Problem is, when I enter 1, I get one. When I enter 2, I get three. Then
everything 3 and above gives me one less label. So 3 gets me two, 4 gets me
three, 5 gets me four and so on. Its quite annoying!!!
Each report has a Text Box called [RepeatCounter] and its Control Source is
=[How many labels?]. In the Detail Section of the report, the OnPrint
property has this code.
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If IsNull([RepeatCounter]) Then
ElseIf intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End Sub
Why did this work for so long and is now acting up? How can I get it to
function again?
Some reports use a macro with the OpenReports action, View is Print and
Window Mode is Normal. Some reports use a button on a form with the line
DoCmd.OpenReport stDocName, acViewNormal.
I want it to be automated. I could change everything to Print Preview and
then <Ctrl>+<P> and select my own number of copies but that defeats the
purpose.
I had a few Combo Boxes that went blank and wouldn't show it results after
the SP3 upgrade but I fixed that with a Hot Fix for XP Service Pack 3. The
fix solved the Combo Box issue but did not help this problem.
Any ideas to fix this?