Originally Posted by
KickPuncher
For myself; I'm not worried much about controls.
I don't use macros, even in my personal mdb's.
But in looking at the macro actions, the only way I can see to get the report name is to set up a macro for each report, that then calls a function that saves the report. (IMO - Macros are very limiting) You will have to add/modify the macros/functions each time you add a report.
one macro calls one function for one report
Code:
Function ReportA()
On Error GoTo ReportA_Err
Dim FileName As String
FileName = "c:\Documents and Settings\username\Desktop\ReportA.pdf"
DoCmd.OutputTo acOutputReport, ReportName(i), acFormatPDF, FileName
ReportA_Exit:
Exit Function
ReportA_Err:
MsgBox Error$
Resume ReportA_Exit
End Function
Function ReportB()
On Error GoTo ReportB_Err
Dim FileName As String
FileName = "c:\Documents and Settings\username\Desktop\ReportB.pdf"
DoCmd.OutputTo acOutputReport, ReportName(i), acFormatPDF, FileName
ReportB_Exit:
Exit Function
ReportB_Err:
MsgBox Error$
Resume ReportB_Exit
End Function
Sorry I couldn't help you more.......