If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Printing Labels but designating which label on sheet to start prin
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 |
#2
|
|||
|
|||
Printing Labels but designating which label on sheet to start prin
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. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
Printing Labels but designating which label on sheet to start
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" wrote: 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… 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 Please respond only to this newsgroup. I do not reply to personal e-mail |
#4
|
|||
|
|||
Printing Labels but designating which label on sheet to start
On Tue, 11 Aug 2009 15:22:01 -0700, Chris wrote:
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" wrote: 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. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail 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 Please respond only to this newsgroup. I do not reply to personal e-mail |
#5
|
|||
|
|||
Printing Labels but designating which label on sheet to start
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 Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "fredg" wrote in message .. . On Tue, 11 Aug 2009 15:22:01 -0700, Chris wrote: 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" wrote: 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. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail 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 Please respond only to this newsgroup. I do not reply to personal e-mail |
#6
|
|||
|
|||
Printing Labels but designating which label on sheet to start
On Wed, 12 Aug 2009 10:36:47 +0800, Allen Browne wrote:
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. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
Thread Tools | |
Display Modes | |
|
|