Printing labels help needed

R

Rick

Hi, I have a simple report that prints mailing labels (30
per page). When only 10-15 records are sent to be
printed, the rest of the labels sheet is wasted (unless I
flip it over and re-feed). I would like to be able to
allow users to enter the row number where they would like
the lables to start printing (or even better the exact
number of the first available label - Word has a similar
feature when printing a single label, you can choose the
row and column where you want the label printed). I have
built a makeshift solution by merging to word, but I would
like to do it all in Access. Thanks for any help,
-Rick
 
F

Fredg

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
=====

When you are ready to run the label report, it will ask how many to
skip.
Then it will run the report.
 
F

Fredg

Instead of
=[Skip How Many?]
use
=Forms!FormName!ControlName

Remember then, the form must still be open when you run the label report.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Rick said:
Sounds great, I'll give it a try. I'm assuming that once
I get the hang of how the code works, I could use a text
box on a form to gather then send the "skip" parameter to
the report, yes?
-Rick
-----Original Message-----
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
=====

When you are ready to run the label report, it will ask how many to
skip.
Then it will run the report.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Rick said:
Hi, I have a simple report that prints mailing labels (30
per page). When only 10-15 records are sent to be
printed, the rest of the labels sheet is wasted (unless I
flip it over and re-feed). I would like to be able to
allow users to enter the row number where they would like
the lables to start printing (or even better the exact
number of the first available label - Word has a similar
feature when printing a single label, you can choose the
row and column where you want the label printed). I have
built a makeshift solution by merging to word, but I would
like to do it all in Access. Thanks for any help,
-Rick


.
 

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