ACCESS 2007: Reports Form That Outputs SNP File to Specific Folder Based on Table

I have the following code in my form:

Private Sub SaveReport2_Click()
On Error GoTo SendObject_Error
DoCmd.OutputTo acOutputReport, lstReports.Column(1), acFormatSNP, lstReports.Column(3), False
    If Err.Number = 2501 Then
       MsgBox "Action Canceled.", vbInformation, "Notice!"
   End If
End Sub
The unbound box listing my reports on the "Row Source" is a query called "qryReportsList".
The label on the unbound box is "lstReports"

This worked in 2003, but no longer works in 2007

Once the report is selected, it needs to run before it's saved because it has parameters built in. I get a save as popup window, which is not what it used to do.

Anyone have suggestions?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
...Does this expression (Argument) contain a valid Path and filename?

For example, this works fine for me...
DoCmd.OutputTo acOutputReport, "rptEmployees", acFormatSNP, "c:\YourFolder\YouSnap.snp", False
Just a side note: in Access 2007 you can use acFormatPDF. It is more portable than SNP
Jeffrey CoachmanMIS LiasonCommented:
Also note that you may need to install the snap file options when you install Access/Office
(Always choose a Full install.

Finally note that the snap format was phased out in Access 2010, so when you upgrade, you may not be able to use this format, ...
...So consider moving to the .pdf format for things like this
(Also not that an addin for PDF was required in Access 2007, ...but is included by default in 2010 and newer)
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

eossmaAuthor Commented:
OK, you've convinced me on the PDF, and will adjust.

To the first question, "Does this expression (Argument) contain a valid Path and filename?", the answer is yes. The database sits in the root folder Z:\@MasterDatabase.

lstReports.Column(3) paths all point to Z:\@MasterDatabase\AccessSnapshots - to be renamed.
eossmaAuthor Commented:
my vba code in this db stopped working. it's not just the above, it's all other too.

eossmaAuthor Commented:
So I noticed that if I converted the scripts to macros, the event functioned properly. What was odd was that in 2 days the database scripts started acting up - randomly. Sometimes they would work, and sometimes they wouldn't. Since I had been in the process of "cleaning up" the scripts for a new environment and purpose, the thought occurred to me that I might have deleted something vital in the process. I created the db in 2004, so there must have been something I didn't recall that was vital.

I copied and pasted all the scripts from the old version of the db - and whalla! It works smoothly again.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
eossmaAuthor Commented:
I fixed my own problem!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.