Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts

    code doesn't work with some printers (Access 2000 (all updates))

    I have the code below to enable the user to pause after printing of page 1 and turn the paper over and print on the reverse side. It works perfectly on most printers...but on some printers things just sit there and nothing at all prints until the OK button is pressed (one specific printer is a Lexmark Z25).

    Is there a particular reason the code works on some printers but not all? Or is there another way to accomplish the same thing?

    Option Compare Database
    Option Explicit
    Private Printing As Integer

    Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)

    If Me.Page = 1 Then
    Me.Label161.Visible = False
    Else
    Me.Label161.Visible = True
    End If

    End Sub

    Private Sub Report_Activate()

    'Occurs only when previewing
    Printing = -1
    End Sub

    Private Sub Report_Deactivate()
    'Reset for next time
    Printing = 0
    End Sub

    Private Sub Report_Page()

    If Me.Page > 1 And Printing > 0 Then

    Call MsgBox(" Please turn paper over" _
    & vbCrLf & "and press OK to print page 2." _
    , vbExclamation, "Pause printing")
    End If

    End Sub

    Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)

    'Occurs when previewing and when printing
    Printing = Printing + 1
    End Sub

    Thanks.

    Tom

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: code doesn't work with some printers (Access 2000 (all updates))

    I suspect it's a function of the printer driver being used - some probably don't do the page eject until the formatting of the second page begins. I'm afraid I don't have any better suggestions. Using a generic HP driver might be a possibility if that printing mode is supported on the Lexmark - some of the old HP modes are sometimes supported. However that would require having a specific printer used on that workstation, which can be a can of worms.
    Wendell

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: code doesn't work with some printers (Access 2000 (all updates))

    There could be a number of reasons why it doesn't work on all printers, but two I can think of offhand are:

    1. Not all printers are duplexing, believe it or not.

    2. Duplexing printers must have the feature turned on or it doesn't work.

    Could either of these apply in your case?
    Charlotte

  4. #4
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: code doesn't work with some printers (Access 2000 (all updates))

    Charlotte and Wendell
    Thanks for your replies. I'll do some further checking.

    Appreciate your input.

    Tom

Posting Permissions

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