Solved

error in printing

Posted on 2014-09-29
8
107 Views
Last Modified: 2014-10-06
I have a form that users are printing and sporatically they get a runtime error.  I think I narrowed it down to this section of code:

If MsgBox("Would you like to print this record?", vbYesNo Or vbQuestion, "Print Record") = vbYes Then
Me.PrintForm
Printer.Print ""
Printer.PaintPicture Picture2.Picture, 0, 0, 12000, 12000
Printer.EndDoc
End If

Open in new window


When they click Yes, they get an error sometimes.  Is there  a better way to print Picture2?
0
Comment
Question by:al4629740
  • 5
  • 3
8 Comments
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40350228
What error do they get?
0
 

Author Comment

by:al4629740
ID: 40350481
I wish I could get them to write it down, but it is a runtime error.  I don't get an error.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40350649
Some thoughts:
What's different about your customer(s) with the problem? Different OS? Different printer?
Is it always the same customer?
Is it always the same picture?
There's code out there that you could add to your project that would send you an email containing the error information when the error occurs.
0
 

Author Comment

by:al4629740
ID: 40351135
Can I send the code to the database when An error occurs
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 45

Expert Comment

by:Martin Liss
ID: 40351150
You can do anything you want.
0
 

Author Comment

by:al4629740
ID: 40357900
Can you provide a good example that would retrieve the error and send to db by chance
0
 
LVL 45

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40358179
No I can't but if you are already writing to a database from the application then it should be easy to add a new table for the errors and in that table include things like the user's name, err.number, erl (the line number where the error occurred), and the name of the procedure where the error occurred. For help with the latter take a look at my Automatic Insertion of Procedure Names add in.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40364644
I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now