Solved

Error when outputting a Report with Snapshot format

Posted on 2016-08-01
7
60 Views
Last Modified: 2016-08-03
In Access 97, Windows 10, I am trying to output a Report using Snapshot Format.
I installed the Service Release 1 Patch for Access 97
to be able to  output a Report using Snapshot Format
I use the following command
DoCmd.OutputTo acOutputReport, Report, "SnapshotFormat(*.snp)", "", True
(Please note that after the fourth comma of the code, I added quotes, so that the system will prompt me for a location where to save the report.)

When it tried to save the report, it opens a dialog box where I can select the destination, it shows me the saved filename, but in reality it did not save the file, it shows me an error message:
Runtime error 2587. MS Access cannot complete the output operation.
I took this information from the following address;
http://www.lebans.com/reporttopdf.htm
I downloaded from there the sample database, and noticed that the only difference that maybe causing the problem is that the References that are checked off in the sample database are 1) Microsoft ActiveX Data Objects 2.5 Library. and 2) Microsoft DAO 3.6 Object Library.
In my own database, I can only use the Microsoft DAO 3.51 Object Library, because if I use the 2 above References, I get error messages for all my RecordSets.
0
Comment
Question by:Moshe Singer
[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
7 Comments
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 41738163
You need to firstly check that Windows 10 supports the snapshot format. Office 2010 and later do not, and so there may not be a valid reader for it.

Assuming that there is, have you tried using the constant acFormatSNP (without quotes) instead of  "SnapshotFormat(*.snp)"?

Kelvin
0
 
LVL 37

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41738186
A97, while my favorite Access version EVER, is woefully out of date.  It is 19 years old.  In human years, that's got to be close to 200 years!!

Current versions of Access have a FREE runtime edition.  You can purchase one version of A2016 for the developer and use the free download for everyone else to run the application.  Keep in mind that you can't convert from A97 directly to A2016.  You would have to have some older version of Access such as A2003 or A2007 to do the conversion.   Then you could take the app the rest of the way to A2016.  The downside to using the runtime is that the application must control the interface completely using forms and reports since the runtime will not allow the user to open any object in design view.  You also need to use robust error trapping to avoid having the app just up and shut down if it encounters an untrapped error.  Start a new thread if you want to proceed with this.
0
 
LVL 57
ID: 41738833
<<Runtime error 2587. MS Access cannot complete the output operation.>>

 This probably has more to do with drivers and the OS than anything.

<<I downloaded from there the sample database, and noticed that the only difference that maybe causing the problem is that the References that are checked off in the sample database are 1) Microsoft ActiveX Data Objects 2.5 Library. and 2) Microsoft DAO 3.6 Object Library.
In my own database, I can only use the Microsoft DAO 3.51 Object Library, because if I use the 2 above References, I get error messages for all my RecordSets.>>

 The reason is the order of the references is important if you have not explicitly declared things.

 ADO and DAO both have a recordset object and while similar, they are not the same.  So if your code is currently using DAO and you've done this:

 Dim rs as Recordset

 and the ADO reference is listed first, your code will error because it thinks it is an ADO recordset.   You can either move the DAO reference before the ADO one or explicitly declare everything:

 Dim rs as DAO.Recordset
 Dim rs2 as ADODB.Recordset

Then the code will compile without error.   Fix that first and then see if the snapshot format works.

 and BTW, if this is to get PDF output, there are other ways to achieve that.

Jim.
1
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:Moshe Singer
ID: 41739276
Hi Jim

<<and BTW, if this is to get PDF output, there are other ways to achieve that>>
Thanks a million for your comments. I will try it out now. But you mentioned that there are other ways to achieve outputting a pdf. If you can recommend those other options I will be very appreciative.
Looking forward to your reply.
0
 
LVL 57
ID: 41739366
One other popular method in years past was to define a printer with post script output and then use Ghost Script to translate it to a PDF.

The other is to use a printer driver (i.e. CutePDF) that goes straight to PDF.

Jim.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 41740794
Or get Adobe Acrobat and print to the PDF printer.  That is what I did for Access 97.
0
 

Author Closing Comment

by:Moshe Singer
ID: 41740902
thet is wate I am doing now
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

739 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