I want to print diff qty number of the same labels in access.
field 1: product #
field 2: product name
Field 3: price
field 4: qty to be ordered = to be printed
The above data is coming from a customer order system, downloaded into
access or xl.
I can create the label with fields 1-2-3 and depending on the data in field
4 I want this number of labels printed.
How can I make this happen in access or xl.
thanks
Marcel
thiss will repeat print labels and offer the ability to start printing
from a pre-selected position on a sheet (if labels are missing).
First make a regular label report that correctly prints one label per
record.
It assumes a Report Record Source with a field [Qty] that contains the
number of times you wish to repeat a label.
Make sure the [Qty] field (or your equivalent field name) is included
in the Detail section.
Set it's Visible property to No.
Next add a Report Header to the report.
Add 2 unbound text boxes to the Header.
1) Name one SkipControl
Leave it's Control Source unbound
2) Name the other SkipCounter
Set it's Control Source to:
= [Skip How Many?]
Then code the Report Header Format event as follows:
(watch out for word wrap on the longer lines):
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
======
Next code the Detail Print event:
(Note that intMyPrint is Static!!)
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 [Qty] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If
End Sub
=========
When you run the report, it will ask how many missing label positions
to skip.
Then it will repeat labels as indicated in each records [Qty] field.
**Remember to change the [Qty] field to whatever you named your
field.**
Hope this helps.