mmaginniss
Technical User
I have automated the task of ouptutting a report to a file on the network using the OutputTo method but now management wants me to save the file by date - so that they can see the changes in the report based on what day it was generated. Here's my current code (I changed the location to my desktop for this example):
Function cmdCITReport()
Dim stDocName As String
stDocName = "rptCITPriority"
DoCmd.OutputTo acReport, stDocName, acFormatRTF, "C:\Documents and Settings\atp2mxm\Desktop\cmdRpt.rtf"
End Function
What I would like is for it to output cmdRpt_ddmmmyy.rtf with ddmmyyy being the date the report was generated. Then every time the report is generated it would create a new file. Any ideas? Thanks.
Function cmdCITReport()
Dim stDocName As String
stDocName = "rptCITPriority"
DoCmd.OutputTo acReport, stDocName, acFormatRTF, "C:\Documents and Settings\atp2mxm\Desktop\cmdRpt.rtf"
End Function
What I would like is for it to output cmdRpt_ddmmmyy.rtf with ddmmyyy being the date the report was generated. Then every time the report is generated it would create a new file. Any ideas? Thanks.