W
Wulf Wendelstein
Hi,
To print copies of labels (A2k), I use the following code in the report:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If copies = 0 Then
Me.NextRecord = True
Me.MoveLayout = False
Me.PrintSection = False
Else
If FormatCount < copies Then
Me.NextRecord = False
Me.MoveLayout = True
Me.PrintSection = True
End If
End If
End Sub
"copies" is a field in the query for the report (originally the number of
ordered items), which is quite simple. There is no other code in the report.
Now the following happens:
copies = 1 prints 1 label
copies = 2 prints 2 labels
copies = 3 prints 3 labels
copies = 4 prints 3 labels
copies = 5 prints 4 labels
copies = 6 prints 5 labels
copies = 7 prints 5 labels
copies = 8 prints 5 labels
copies = 9 prints 6 labels
copies = 10 prints 6 labels
etc.
I can't see any logic behind this behaviour. It happens also with the
similar examples for printing copies which can be found in the web, using
FormatCount and NextRecord..
What is wrong here? Is there another way to print copies?
To print copies of labels (A2k), I use the following code in the report:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If copies = 0 Then
Me.NextRecord = True
Me.MoveLayout = False
Me.PrintSection = False
Else
If FormatCount < copies Then
Me.NextRecord = False
Me.MoveLayout = True
Me.PrintSection = True
End If
End If
End Sub
"copies" is a field in the query for the report (originally the number of
ordered items), which is quite simple. There is no other code in the report.
Now the following happens:
copies = 1 prints 1 label
copies = 2 prints 2 labels
copies = 3 prints 3 labels
copies = 4 prints 3 labels
copies = 5 prints 4 labels
copies = 6 prints 5 labels
copies = 7 prints 5 labels
copies = 8 prints 5 labels
copies = 9 prints 6 labels
copies = 10 prints 6 labels
etc.
I can't see any logic behind this behaviour. It happens also with the
similar examples for printing copies which can be found in the web, using
FormatCount and NextRecord..
What is wrong here? Is there another way to print copies?