Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    'Unbound' labels in a report (2000)

    Can I make a report that will print out a full page of duplicate labels. I have a couple of "Label" boxes and one text box [Enter name] and would like to print out x number of pages of labels. When I set it up as I thought I should (using the label wizard), it prints two on the top row only, but no more than two rows. Any ideas? (Other than use Microsoft Word!)
    Thanks,
    Warren

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Unbound' labels in a report (2000)

    See if you can adapt one of the replies to <post#=167603>post 167603</post#> for your needs.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Unbound' labels in a report (2000)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Thanks, Hans, once again!
    I am using the suggested code from

    http://support.microsoft.com/?kbid=231801

    but I do have one problem. The labels are two columns wide and set that way in the page setup. When I enter the number of "copies to print" in the dialogue box, it seems to print that number of ROWS, rather than that number of labels. Any ideas why and what to do about it?

    Warren

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Unbound' labels in a report (2000)

    Open the report in design view.
    Select File | Page Setup.
    Activate the Columns tab.
    Specify that you want to print Across, then Down instead of Down, then Across.
    Click OK.
    Save the report.

  5. #5
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Unbound' labels in a report (2000)

    Sadly, that is already the way it was set. It does print two columns wide correctly, but the "Number of copies" appears to signal to print a certain number of rows, rather than the number of labels...

    Not a real big deal...

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Unbound' labels in a report (2000)

    No, I'm sure 'Number of copies' is just that - I use this method successfully in a number of my databases. If you wish to pursue this, you could post a stripped down copy of your database. See <post#=401925>post 401925</post#> for instructions.

  7. #7
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Unbound' labels in a report (2000)

    OK, here's the stripped down copy...

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Unbound' labels in a report (2000)

    Your report is based on the Memorial table, which has two records, but none of the controls is bound to a field in the table. The result is that the number of labels you specify is multiplied by 2. so that you always get a number of complete rows.

    In the present setup, you can't just clear the Record Source property, for then the parameter prompt won't work any more. You should base the report on a table with just one record; it can be a table with dummy data since you don't use that anyway.

  9. #9
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Unbound' labels in a report (2000)

    Thanks, that fixed it.

  10. #10
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Unbound' labels in a report (2000)

    If I am using the function "LabelLayout" that skips blank records and allows you to specify the number of copies to print:

    Function LabelLayout(R As Report)
    If BlankCount& < LabelBlanks& Then
    R.NextRecord = False
    R.PrintSection = False
    BlankCount& = BlankCount& + 1
    Else
    If CopyCount& < (LabelCopies& - 1) Then
    R.NextRecord = False
    CopyCount& = CopyCount& + 1
    Else
    CopyCount& = 0
    End If
    End If
    End Function

    AND, using the code you graciously provided to print two copies of each label that are "DVD" or "VID"...

    ' Are we printing a label for a DVD or Video?
    If Me.Media = "DVD" Or Me.Media = "Video" Then
    ' If so, is this the first time round?
    If PrintCount = 1 Then
    ' Repeat this record
    Me.NextRecord = False
    End If
    End If

    how do I modify the function to not override the desired duplication (which seems to make it print only one, even the "DVD" and "VID". (I could really use the portion that allows me to skip the blank labels! But for these labels, I don't want or need to specify the number of copies to print otherwise)

    Thanks,
    Warren

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Unbound' labels in a report (2000)

    You can remove the prompt for the number of copies to be printed from the LabelSetup function.
    Clear the On Print property of the Detail section of the report, then select [Event Procedure] from the dropdown list in this event and click the ... button to the right of the dropdown arrow. Make the code look like this:

    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    If intCopyCount = 0 Then
    f Me.Media = "DVD" Or Me.Media = "Video" Then
    intLabelCopies = 2
    Else
    intLabelCopies = 1
    End If
    End If
    If intBlankCount < intLabelBlanks Then
    Me.NextRecord = False
    Me.PrintSection = False
    intBlankCount = intBlankCount + 1
    ElseIf intCopyCount < (intLabelCopies - 1) Then
    Me.NextRecord = False
    intCopyCount = intCopyCount + 1
    Else
    intCopyCount = 0
    End If
    End Sub

    The original code for testing on DVE/Video is replaced by the above.

  12. #12
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Unbound' labels in a report (2000)

    Thanks, Hans...but, I am getting a syntax error with that code on both of these lines:

    If intBlankCount < intLabelBlanks Then

    ElseIf intCopyCount < (intLabelCopies - 1) Then

    Can you tell where the syntax error(s) lie?

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Unbound' labels in a report (2000)

    I'm sorry, I copied the code from a version that uses different variable names. Replace all occurrences of:

    intBlankcount with BlankCount
    intLabelBlanks with LabelBlanks
    intCopyCount with CopyCount
    intLabelCopies with LabelCopies

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •