print multiple labels for selected addresses

G

Guest

How can I print multiple labels for each address from a report based on a
query in Access 2003. The help states that step by step instuctions are
available on the knowledge base but I can't find them.
 
C

Chris Reveille

This code comes from FredG and works in Access 2000. I
hope this helps:

Try this code. I know it works both in preview and printing.
If this is what you are already using, or if this doesn't
work, then your problem lies elsewhere.
====
First make sure your label report is properly printing a
full sheet of
labels.

Then add a Report Header to your label report.
Add 2 text boxes to the Header.
1) Name one SkipControl
Leave it's control source unbound

2) Name the other SkipCounter
Set it control Source to =[Skip How Many?]

Now code the Report Header Format event as below:

Private Sub ReportHeader_Format(Cancel As Integer,
FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
==========

Next code the Detail OnPrint event:

Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
End If

End Sub

Chris
 
G

Guest

Many thanks Chris, I'll try the codes as suggested.

David

Chris Reveille said:
This code comes from FredG and works in Access 2000. I
hope this helps:

Try this code. I know it works both in preview and printing.
If this is what you are already using, or if this doesn't
work, then your problem lies elsewhere.
====
First make sure your label report is properly printing a
full sheet of
labels.

Then add a Report Header to your label report.
Add 2 text boxes to the Header.
1) Name one SkipControl
Leave it's control source unbound

2) Name the other SkipCounter
Set it control Source to =[Skip How Many?]

Now code the Report Header Format event as below:

Private Sub ReportHeader_Format(Cancel As Integer,
FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
==========

Next code the Detail OnPrint event:

Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
End If

End Sub

Chris
-----Original Message-----
How can I print multiple labels for each address from a report based on a
query in Access 2003. The help states that step by step instuctions are
available on the knowledge base but I can't find them.
.
 
G

Guest

Chris Reveille said:
This code comes from FredG and works in Access 2000. I
hope this helps:

Try this code. I know it works both in preview and printing.
If this is what you are already using, or if this doesn't
work, then your problem lies elsewhere.
====
First make sure your label report is properly printing a
full sheet of
labels.

Then add a Report Header to your label report.
Add 2 text boxes to the Header.
1) Name one SkipControl
Leave it's control source unbound

2) Name the other SkipCounter
Set it control Source to =[Skip How Many?]

Now code the Report Header Format event as below:

Private Sub ReportHeader_Format(Cancel As Integer,
FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
==========

Next code the Detail OnPrint event:

Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
End If

End Sub

Chris
-----Original Message-----
How can I print multiple labels for each address from a report based on a
query in Access 2003. The help states that step by step instuctions are
available on the knowledge base but I can't find them.
.
 
G

Guest

Chris Reveille said:
This code comes from FredG and works in Access 2000. I
hope this helps:

Try this code. I know it works both in preview and printing.
If this is what you are already using, or if this doesn't
work, then your problem lies elsewhere.
====
First make sure your label report is properly printing a
full sheet of
labels.

Then add a Report Header to your label report.
Add 2 text boxes to the Header.
1) Name one SkipControl
Leave it's control source unbound

2) Name the other SkipCounter
Set it control Source to =[Skip How Many?]

Now code the Report Header Format event as below:

Private Sub ReportHeader_Format(Cancel As Integer,
FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
==========

Next code the Detail OnPrint event:

Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
End If

End Sub

Chris
-----Original Message-----
How can I print multiple labels for each address from a report based on a
query in Access 2003. The help states that step by step instuctions are
available on the knowledge base but I can't find them.
.
 

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

Top