Solved

can't print form image to this type of printer in vb6

Posted on 2013-11-22
4
482 Views
Last Modified: 2013-11-22
I have the following vb6 code.

If MsgBox("This record has been saved.  Would you like to print?", vbYesNo Or vbQuestion, "Print Record") = vbYes Then
    Printer.Orientation = vbPRORLandscape
    frmRegistrationSYAB.PrintForm
    Printer.Orientation = vbPRORLandscape
    frmRegistrationSYAB2.PrintForm
End If

Open in new window



I get the error on line 5 "can't print form image to this type of printer"

Why is this happening?
0
Comment
Question by:al4629740
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 39670797
What is your default printer?
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 39670831
make a call to the Printer.EndDoc method after each PrintForm method call :

If MsgBox("This record has been saved.  Would you like to print?", vbYesNo Or vbQuestion, "Print Record") = vbYes Then
    Printer.Orientation = vbPRORLandscape
    frmRegistrationSYAB.PrintForm
    Printer.EndDoc
    Printer.Orientation = vbPRORLandscape
    frmRegistrationSYAB2.PrintForm
    Printer.EndDoc
End If

Open in new window


http://support.microsoft.com/kb/242483
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 39670837
Does the printer have the ability to print landscape?
0
 

Author Closing Comment

by:al4629740
ID: 39670920
That worked.  Thanks!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question