Printing Multiple Labels of the same record

G

Guest

I currently print labels based on a report and get one label for each record.
I would like to key in the number of labels for each record prior to saving
my order and have my report print the requested quantity for each record
showing in the report. My code is:

Function Print_Report()
On Error GoTo Print_Report_Err
Dim Counter As Integer
Dim ReportDest As String
'Hide the form PrintReportsDialog
Forms![PrintReportsDialog].Visible = False
'Destination is Print Preview
If Forms![PrintReportsDialog]![Type of Output] = 1 Then
ReportDest = acNormal
Else 'Destination is Printer
ReportDest = acPreview
End If

With CodeContextObject
' Attached to the Print button on the PrintReportsDialog form

Select Case .[Report to Print]
Case 1 'Labels
'Print Labels for Order Report
Do While Counter < .[Number of Copies]
If Forms![PrintReportsDialog]![Select Order Type] = 1 And
Forms![PrintReportsDialog].[Select Number] = 1 Then
DoCmd.OpenReport "rptOrder", ReportDest, ,
Eval("IIf(Forms![PrintReportsDialog]![Select List] Is Null,"""",""[OrderID] =
Forms![PrintReportsDialog]![Select List]"")")
End If
Counter = Counter + 1
Loop

ANY HELP would be appreciated on how to accomplish.

Thanks
 
A

Allen Browne

See:
Print a Quantity of a Label
at:
http://allenbrowne.com/ser-39.html

The article explains how you can add a field to your table to indicate how
many of each label you want printed, and then generate a record for each
label. It does not require code.
 
G

Guest

Your article worked EXACTLY as you described. Could not have been any
easier. Thank you SO MUCH for your assistance.

Allen Browne said:
See:
Print a Quantity of a Label
at:
http://allenbrowne.com/ser-39.html

The article explains how you can add a field to your table to indicate how
many of each label you want printed, and then generate a record for each
label. It does not require code.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

hdfixitup said:
I currently print labels based on a report and get one label for each
record.
I would like to key in the number of labels for each record prior to
saving
my order and have my report print the requested quantity for each record
showing in the report. My code is:

Function Print_Report()
On Error GoTo Print_Report_Err
Dim Counter As Integer
Dim ReportDest As String
'Hide the form PrintReportsDialog
Forms![PrintReportsDialog].Visible = False
'Destination is Print Preview
If Forms![PrintReportsDialog]![Type of Output] = 1 Then
ReportDest = acNormal
Else 'Destination is Printer
ReportDest = acPreview
End If

With CodeContextObject
' Attached to the Print button on the PrintReportsDialog form

Select Case .[Report to Print]
Case 1 'Labels
'Print Labels for Order Report
Do While Counter < .[Number of Copies]
If Forms![PrintReportsDialog]![Select Order Type] = 1 And
Forms![PrintReportsDialog].[Select Number] = 1 Then
DoCmd.OpenReport "rptOrder", ReportDest, ,
Eval("IIf(Forms![PrintReportsDialog]![Select List] Is
Null,"""",""[OrderID] =
Forms![PrintReportsDialog]![Select List]"")")
End If
Counter = Counter + 1
Loop

ANY HELP would be appreciated on how to accomplish.

Thanks
 
G

Guest

Thank you Allen, did exactly what it said on the tim

Phil

hdfixitup said:
Your article worked EXACTLY as you described. Could not have been any
easier. Thank you SO MUCH for your assistance.

Allen Browne said:
See:
Print a Quantity of a Label
at:
http://allenbrowne.com/ser-39.html

The article explains how you can add a field to your table to indicate how
many of each label you want printed, and then generate a record for each
label. It does not require code.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

hdfixitup said:
I currently print labels based on a report and get one label for each
record.
I would like to key in the number of labels for each record prior to
saving
my order and have my report print the requested quantity for each record
showing in the report. My code is:

Function Print_Report()
On Error GoTo Print_Report_Err
Dim Counter As Integer
Dim ReportDest As String
'Hide the form PrintReportsDialog
Forms![PrintReportsDialog].Visible = False
'Destination is Print Preview
If Forms![PrintReportsDialog]![Type of Output] = 1 Then
ReportDest = acNormal
Else 'Destination is Printer
ReportDest = acPreview
End If

With CodeContextObject
' Attached to the Print button on the PrintReportsDialog form

Select Case .[Report to Print]
Case 1 'Labels
'Print Labels for Order Report
Do While Counter < .[Number of Copies]
If Forms![PrintReportsDialog]![Select Order Type] = 1 And
Forms![PrintReportsDialog].[Select Number] = 1 Then
DoCmd.OpenReport "rptOrder", ReportDest, ,
Eval("IIf(Forms![PrintReportsDialog]![Select List] Is
Null,"""",""[OrderID] =
Forms![PrintReportsDialog]![Select List]"")")
End If
Counter = Counter + 1
Loop

ANY HELP would be appreciated on how to accomplish.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top