473,323 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

run time error 2202

jj
Hi All

I wan't to create a PDF document automatically from Access, and I have tried
to use the way Keri Hardwick explains on:
http://www.mvps.org/access/reports/rpt0011.htm

But when the code reaches:
DoCmd.OpenReport "YourReportName", acViewNormal
in the code below, the following run time error appears:

run time error 2202
you must install a printer before you design, print or preview

What am I suppose to do to prevent this?
ChangeToAcrobat
ChangePdfFileName "Name of pdf file including .pdf"
DoCmd.OpenReport "YourReportName", acViewNormal
ResetDefaultPrinterThanks in advance
Nov 13 '05 #1
1 4849
Just working from memory here, but I have the impression that code does not
work correctly with Acrobat 5 or 6, as they do not respond to the win.ini
settings.

(Presumably you are aware of the difference between Acrobat Reader and
Acrobat.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jj" <jj@get2net.dk> wrote in message
news:40*********************@dread11.news.tele.dk. ..

I wan't to create a PDF document automatically from Access, and I have tried to use the way Keri Hardwick explains on:
http://www.mvps.org/access/reports/rpt0011.htm

But when the code reaches:
DoCmd.OpenReport "YourReportName", acViewNormal
in the code below, the following run time error appears:

run time error 2202
you must install a printer before you design, print or preview

What am I suppose to do to prevent this?
ChangeToAcrobat
ChangePdfFileName "Name of pdf file including .pdf"
DoCmd.OpenReport "YourReportName", acViewNormal
ResetDefaultPrinterThanks in advance

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: PW | last post by:
Hi, I'm using WinXP-Pro, ASP classic, IIS 5.0. I regularly get this error, but I know I am the only user accessing the website at the time of the error. I looked it up on the MS support...
18
by: Ken | last post by:
Hi. Can anyone refer me to any articles about the compatibility between c++ polymorphism and real-time programming? I'm currently on a real-time c++ project, and we're having a discussion...
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
1
by: MLH | last post by:
I want to change my system time date each time an A97 app is started. Here's how I've been doing it. Am looking for a better way. Sure some of you have researched this. Function...
1
by: Alfonso Morra | last post by:
Hi I'm compiling some code and need to generate some random numbers. To save time, I decided to use the srand, rand and time functions. My code worked (atleast built fine) until I added time.h,...
15
by: Khurram | last post by:
I have a problem while inserting time value in the datetime Field. I want to Insert only time value in this format (08:15:39) into the SQL Date time Field. I tried to many ways, I can extract...
9
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them...
1
by: Robert Lilly | last post by:
Hi, When I try to print a report from Microsoft Access, I recieve a Runtime error and '2202' is the error code. Office assistant instructs me to set my printer to default but my printer is already...
4
by: ahmurad | last post by:
Dear Xperts, In my database table some fault code type records are inserted and the values are like bellows: Error:2/FC:10; 00:15:13 16/03/2009; Error:2/FC:20; 00:15:15 16/03/2009; ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.