Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print multiple labels

Status
Not open for further replies.

Bennie47250

Programmer
Nov 8, 2001
515
US
Using Access 97.

Have our sales and customer table joined together. I designed a shipping label using the label wizard and I’m able to print out one label fine, but I would like to know how to print multiple labels.

The label information is pulled from a select query. We enter the order number and it pulls the appropriate label information. However it only prints the one label and most times we will need multiple labels. In the sales table there is a field that shows the number of cartons we are shipping and since we need one label per carton, it would be nice to be able to use this field to determine the number of labels to print.

Any suggestions on how to print the multiple labels?

Thanks
Bennie
 
Hi

I have a method to do this, which was posted by Fredg on microsoft site, (so credit to him), it will also skip used labels on a page

On the form you use to fire off the print of the labels put two controls:

txtMissingLabels default value 0
txtQty default value 1

in labels report put code like:

Option Compare Database
Option Explicit
Dim strSkipControl As String
Dim intLabelsToSkip As Integer
Dim intQty As Integer

Static Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim intMyPrint As Integer
'
If FormatCount <= intLabelsToSkip And strSkipControl = &quot;Skip&quot; Then
Me.NextRecord = False
Me.PrintSection = False
intMyPrint = 0
Else
strSkipControl = &quot;No&quot;
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If intMyPrint Mod intQty = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If

End Sub

Private Sub Report_Open(Cancel As Integer)
If IsLoaded(&quot;frmAddressLabels&quot;) Then
intLabelsToSkip = Forms!frmAddressLabels!txtMissingLabels
intQty = Forms!frmAddressLabels!txtQty
Else
intLabelsToSkip = 0
intQty = 1
End If

...etc

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
strSkipControl = &quot;Skip&quot;
Cancel = True
End Sub

If you EMail me I will send example

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reay@talk21.com
 
Thanks Ken, I will give this a try and if I need additional help, will post again.

Bennie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top