Solved

Error when outputting a Report with Snapshot format

Posted on 2016-08-01
7
45 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
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 34

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Export  Access Query To Excell 16 47
MS Access to SQL Conversion - Bit and Yes/No Datatypes 12 46
Cross Tab with two column values 7 38
MS Access Tables Linking 6 43
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

863 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

26 Experts available now in Live!

Get 1:1 Help Now