'Cancel' in 'Output file Name' causes problems!

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
Painkiller
Posts: 1
Joined: Fri Jan 21 2005

'Cancel' in 'Output file Name' causes problems!

Post by Painkiller »

Amyuni PDF Converter v2.09
Microsoft Access 2000
Win XP

DoCmd.SelectObject acReport, sObjName
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, sObjName, acSaveYes

I'm using these commands to select, print and close my Microsoft Access 2000 reports. The 'DoCmd.RunCommand acCmdPrint' kicks off the standard Windows print dialog and the Amyuni PDF Converter starts after clicking 'Ok'. If you click 'Cancel' in the 'Output File Name' dialog box this causes problems since acCmdPrint propably expect some sort of valid input/return value. This causes this error and the application get a bit cranky:

Error 2501 - Invalid Page

Any idea on how to handle this problem?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

This message is generated by Access and not by our driver.

You may catch this message and don't display it to the users.

You may also generate the pdf file without any user interaction, without getting the save as dialog box. If this is a possible solution I can post you a sample code.

Thanks.
Post Reply