eossma
asked on
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
SendObject_Error:
If Err.Number = 2501 Then
MsgBox "Action Canceled.", vbInformation, "Notice!"
End If
End Sub
__________________________ __________ __________ _
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?
__________________________
Private Sub SaveReport2_Click()
On Error GoTo SendObject_Error
DoCmd.OutputTo acOutputReport, lstReports.Column(1), acFormatSNP, lstReports.Column(3), False
SendObject_Error:
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?
Just a side note: in Access 2007 you can use acFormatPDF. It is more portable than SNP
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)
IIRC...
(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)
IIRC...
ASKER
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\AccessS napshots - to be renamed.
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\AccessS
ASKER
my vba code in this db stopped working. it's not just the above, it's all other too.
suggestions?
suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I fixed my own problem!
...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