Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Priinting from Form issue

Priinting from Form issue

Priinting from Form issue


We are using a form in Access to print labels out, which uses a button to print out the labels.

If I go to the report directly and go into print preview and then click print and select a new label printer it prints no problem at all

If I set the new printer as the windows default printer and then print from the form button, it tries to send the print to your printer, but then comes up with paper jam, I open the carriage and then close press feed and then it tries to print some more (appears to be trying to do this over several labels rather than one). Eventually after a few of these it finishes the job.

If I change the default printer back to the old printer it works no problem.

I have gone into the page set up and tried to set the default to the new printer but then it prints to the old one, ignoring the page set up default printer. This then made me think it was the code under the button which was set somehow to user the old printer. I cannot see anything in the code for the button that even relates to the old printer, (see code below, I pout it in as sql but it is an event procedure in Access wasn't sure how to copy it in)
I also have gone through the other modules but cannot seem to locate anything to do with printers.

CODE --> sql

Private Sub cmdPrintTicket_Click()
    Dim QRY As QueryDef
    Dim SQL As String
    Dim YesNo As Boolean
    YesNo = True
    With DoCmd
        If DLookup("[LabelPrinted]", "Packs", "[Output PackRef]='" & Me.cmbPackNumber & "'") = -1 Then
              If MsgBox("This tickets has been printed - are you sure?", vbInformation + vbYesNo, "Print Pack Tickets") = vbNo Then
                YesNo = False
            End If
        End If
        If YesNo Then
            ' update underlying query
            SQL = "SELECT Packs.ChargeNumber, "
            SQL = SQL & "Packs.[Input PackRef], Packs.[Output PackRef], "
            SQL = SQL & "Packs.Machine, Packs.ProcessDate, Packs.ProcessTime, Packs.OrderNumber, "
            SQL = SQL & "Packs.Customer, Packs.Product, "
            SQL = SQL & "Trim(CStr(Packs.Thickness))" & "& "" X "" & " & "Trim(CStr(Packs.Width)) AS Profile,"
            SQL = SQL & "Packs.Species, ZN([Packs].[T18]) AS T18, ZN([Packs].[T21]) AS T21, ZN(Packs.T24) AS T24, ZN(Packs.T27) AS T27, ZN(Packs.T30) AS T30, ZN(Packs.T33) AS T33, ZN(Packs.T36) AS T36, ZN(Packs.T39) AS T39, ZN(Packs.T42) AS T42, ZN(Packs.T45) AS T45, ZN(Packs.T48) AS T48, ZN(Packs.T51) AS T51, ZN(Packs.T54) AS T54, ZN(Packs.T57) AS T57, ZN(Packs.T60) AS T60, ZN(Packs.T63) AS T63, Packs.Pieces, Packs.RunningMetres, Packs.Volume, "
            SQL = SQL & "FullSpecification(Packs.[Output PackRef]) AS Spec "
            SQL = SQL & "FROM Packs "
            SQL = SQL & "WHERE Packs.[Output PackRef]=[Forms]![frmMain]![cmbPacknumber]"
            Set QRY = CurrentDb().QueryDefs("qryPackTickets")
            QRY.SQL = SQL
            Set QRY = Nothing
            .OpenReport "Pack Ticket"
            .SetWarnings False
            .RunSQL "UPDATE Packs SET LabelPrinted = True WHERE [Output PackRef]='" & Me.cmbPackNumber & "'"
            .SetWarnings True
        End If
    End With
End Sub 

Any ideas please. Thanks

RE: Priinting from Form issue


A small update on this, it appears if I go into the report settings and then the page setup and force it to print to the printer then it works.
If I set it back to default printer and change the new label printer as default then it try's to print to the new printer but the prints all mess up.
I think it is because in the default settings in page set up there is not an option for continuous paper. Is this possible at all to get this in the selection in the default printer settings.
Probably not for the right forum for this but maybe I could be pointed in the right direction


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close