EliseFreedman
Programmer
Hi
I am using the following code to loop through a series of reports in my database(The Report Names are stored in a table).
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Reports"
rs.MoveFirst
Do Until rs.EOF
If rs![Print] = True Then DoCmd.OpenReport (rs![ReportName]), A_PREVIEW
rs.MoveNext
Loop
rs.Close
I would now like to add a line of code to automate the saving of the report to a file. The filename would be based on the Report Name for example, One of my reports is called "CreditsAnalysisByCustomer". I want this report to be saved to a file with the filename C:\credits\CreditsAnalysisByCustomer.snp.
Does anyone know how I would set about doing this
I am using the following code to loop through a series of reports in my database(The Report Names are stored in a table).
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Reports"
rs.MoveFirst
Do Until rs.EOF
If rs![Print] = True Then DoCmd.OpenReport (rs![ReportName]), A_PREVIEW
rs.MoveNext
Loop
rs.Close
I would now like to add a line of code to automate the saving of the report to a file. The filename would be based on the Report Name for example, One of my reports is called "CreditsAnalysisByCustomer". I want this report to be saved to a file with the filename C:\credits\CreditsAnalysisByCustomer.snp.
Does anyone know how I would set about doing this