Printing Labels but designating which label on sheet to start prin

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I have a database with records that need to be extracted and printed on
labels. I have a report set up that is perfect for a full sheet of labels.
However, most of these records do not use an entire sheet leaving many unused
labels. Is there a way to designate which row and column to start printing
on a sheet of labels so that we can utilize the full sheet?
Thanks,
Chris
 
I have a database with records that need to be extracted and printed on
labels. I have a report set up that is perfect for a full sheet of labels.
However, most of these records do not use an entire sheet leaving many unused
labels. Is there a way to designate which row and column to start printing
on a sheet of labels so that we can utilize the full sheet?
Thanks,
Chris

First create a label report that prints a full sheet of labels.
Then add a Report Header.
Add 2 unbound controls to the Header.
Name one "SkipControl"
Leave it's control source blank.

Name the other control "SkipCounter"
Set it's control source to:
=[Skip how many?]

Then code the report's Detail Print event¡K

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

End Sub

And code the Report Header's Format event¡K

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

Run the label report. Enter the number of label positions you wish to
skip.
 
Fred,
Thank you for the detailed response. I followed your instructions but am
not getting the results I was hoping for. I am prompted to enter the number
of skips but it still prints starting from the first label at the top. In
addition, it shows the number I entered in the report header. Any hints as
where I went wrong would be very appreciated.
Thanks,
Chris


fredg said:
I have a database with records that need to be extracted and printed on
labels. I have a report set up that is perfect for a full sheet of labels.
However, most of these records do not use an entire sheet leaving many unused
labels. Is there a way to designate which row and column to start printing
on a sheet of labels so that we can utilize the full sheet?
Thanks,
Chris

First create a label report that prints a full sheet of labels.
Then add a Report Header.
Add 2 unbound controls to the Header.
Name one "SkipControl"
Leave it's control source blank.

Name the other control "SkipCounter"
Set it's control source to:
=[Skip how many?]

Then code the report's Detail Print event…

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

End Sub

And code the Report Header's Format event…

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

Run the label report. Enter the number of label positions you wish to
skip.
 
Fred,
Thank you for the detailed response. I followed your instructions but am
not getting the results I was hoping for. I am prompted to enter the number
of skips but it still prints starting from the first label at the top. In
addition, it shows the number I entered in the report header. Any hints as
where I went wrong would be very appreciated.
Thanks,
Chris

fredg said:
I have a database with records that need to be extracted and printed on
labels. I have a report set up that is perfect for a full sheet of labels.
However, most of these records do not use an entire sheet leaving many unused
labels. Is there a way to designate which row and column to start printing
on a sheet of labels so that we can utilize the full sheet?
Thanks,
Chris

First create a label report that prints a full sheet of labels.
Then add a Report Header.
Add 2 unbound controls to the Header.
Name one "SkipControl"
Leave it's control source blank.

Name the other control "SkipCounter"
Set it's control source to:
=[Skip how many?]

Then code the report's Detail Print event¡K

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

End Sub

And code the Report Header's Format event¡K

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

Run the label report. Enter the number of label positions you wish to
skip.

I believe you miss-understood the instructions.

1) Add 1 unbound control to the Report Header.
Set it's control source to
="Skip"
Name this control "SkipControl"

Add another unbound control.
Set it's control source to:

2) =[Skip how many?]
Literally... exactly as I have written it. Do not enter a number
value.
Name this control "SkipCounter".

3) If it shows a value in the report header, you did not code the
Report Header Format event as I suggested.
The Cancel = True hides the Report Header so you should not see
anything in it.
 
Fred, I'm wondering if Chris is using Access 2007, and opening it in Report
view (or even Layout view.)

The section events don't fire in these views, and so the code would not
work.

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

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


fredg said:
Fred,
Thank you for the detailed response. I followed your instructions but am
not getting the results I was hoping for. I am prompted to enter the
number
of skips but it still prints starting from the first label at the top.
In
addition, it shows the number I entered in the report header. Any hints
as
where I went wrong would be very appreciated.
Thanks,
Chris

fredg said:
On Tue, 11 Aug 2009 11:10:01 -0700, Chris wrote:

I have a database with records that need to be extracted and printed on
labels. I have a report set up that is perfect for a full sheet of
labels.
However, most of these records do not use an entire sheet leaving many
unused
labels. Is there a way to designate which row and column to start
printing
on a sheet of labels so that we can utilize the full sheet?
Thanks,
Chris

First create a label report that prints a full sheet of labels.
Then add a Report Header.
Add 2 unbound controls to the Header.
Name one "SkipControl"
Leave it's control source blank.

Name the other control "SkipCounter"
Set it's control source to:
=[Skip how many?]

Then code the report's Detail Print event¡K

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

End Sub

And code the Report Header's Format event¡K

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

Run the label report. Enter the number of label positions you wish to
skip.

I believe you miss-understood the instructions.

1) Add 1 unbound control to the Report Header.
Set it's control source to
="Skip"
Name this control "SkipControl"

Add another unbound control.
Set it's control source to:

2) =[Skip how many?]
Literally... exactly as I have written it. Do not enter a number
value.
Name this control "SkipCounter".

3) If it shows a value in the report header, you did not code the
Report Header Format event as I suggested.
The Cancel = True hides the Report Header so you should not see
anything in it.
 
Fred, I'm wondering if Chris is using Access 2007, and opening it in Report
view (or even Layout view.)

The section events don't fire in these views, and so the code would not
work.

Thanks for calling that to our attention, Alan.
I don't use Access 2007 so I have no idea of the differences between
it and the previous versions of Access.
 
Back
Top