?
Solved

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

Posted on 2013-11-22
4
Medium Priority
?
498 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 48

Expert Comment

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

Accepted Solution

by:
Paul Jackson earned 2000 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 48

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

741 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