Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print Multiple Labels in Varying Amounts (2002 XP)

    I am creating a database which prints HMIS labels. Multiple labels are chosen from a list box on a form, "frmLabel2x2".
    When I click the Preview button on the form the report runs code which prompts for which label to start with, (position on sheet of labels).
    Then the report opens in preview mode.

    I want to be able to select how many copies of each label selection to print.
    For example, I want to print 2 copies of the first label, 6 copies of the second label and 1 copy of the third label.

    I have a "Qty" field in the table "MAINTENANCE" and the query "qryMultiSelectCriteria".
    But I don't know how to update/change the Qty field in the form "frmLabel2x2" or the list box "lstItem".

    I have attached the database, Labels3.mdb. It is in Access XP (2002).

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

    Re: Print Multiple Labels in Varying Amounts (2002 XP)

    Your report is based on qryHMIS, not on qryMultiSelectCriteria. Start by adding Qty to qryHMIS too.
    Next, put a text box bound to Qty in the Detail section of the report. Set its Visible property to No.
    Adapt the code as follows:
    1) In the On Print event of the Detail section of the report:

    ls_DetailOnPrint Me, Me.Qty

    2) In the header of the ls_DetailOnPrint procedure in the basLabelSaver module:

    Sub ls_DetailOnPrint(rpt As Report, iLSCopiesToPrint As Integer)

    See attached version.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Multiple Labels in Varying Amounts (2002

    Thank you for your response. If I go into the table MAINTENANCE and change the Qty field value, then the multiple labels print correctly.

    However, I want to be able to change the labels quantity for each item selected on the form. Or some other way if you have another idea.

    The user is going to require a different count of labels each time for each item selected.

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

    Re: Print Multiple Labels in Varying Amounts (2002

    Provide a continuous form in which the user can edit the Qty field.

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Multiple Labels in Varying Amounts (2002

    Thank you for your suggestion. I have implemented your suggestion.

    I would now like to be able to click a button and set the field [bolSelect], a Yes/No checkbox field so that all records are set to No (False).

    How does one go about doing this? I have attached the database in XP format.

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

    Re: Print Multiple Labels in Varying Amounts (2002

    Assuming that you only want to clear bolSelect for the filtered records (if a filter has been applied):

    Private Sub cmdClearSelectToPrint_Click()
    Dim strSQL As String
    strSQL = "UPDATE qryHMIS SET bolSelect = FALSE "
    If Me.FilterOn And Not Me.Filter = "" Then
    strSQL = strSQL & "WHERE " & Me.Filter
    End If
    DoCmd.SetWarnings False
    DoCmd.RunSQL strSQL
    DoCmd.SetWarnings True
    Me.Requery
    End Sub

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Multiple Labels in Varying Amounts (2002

    Thank you, thank you. Works great!

Posting Permissions

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