Wayne Cramer
Registered User.
- Local time
- Today, 02:43
- Joined
- Aug 10, 2007
- Messages
- 93
I have a vendor report card application which creates an individual RTF file for each of 245 vendors through a module with an array. The files are named as shown below. for example a file name might be April 2008 - ford motor company.rtf .
DoCmd.OpenReport "Report Card YTD", acViewPreview, , strSQL
strFileName = "April 2008 - " & cVendorName & ".rtf"
DoCmd.OutputTo acOutputReport, "Report Card YTD", acFormatRTF, "H:\SUPPLY CHAIN\\RTF Report Cards\" & strFileName, False
DoCmd.Close acReport, "Report Card YTD"
Each month the module needs to be modified to reflect the next month and year. Is there a way for Access to automatically determine the current month and year and insert them in the file name?
DoCmd.OpenReport "Report Card YTD", acViewPreview, , strSQL
strFileName = "April 2008 - " & cVendorName & ".rtf"
DoCmd.OutputTo acOutputReport, "Report Card YTD", acFormatRTF, "H:\SUPPLY CHAIN\\RTF Report Cards\" & strFileName, False
DoCmd.Close acReport, "Report Card YTD"
Each month the module needs to be modified to reflect the next month and year. Is there a way for Access to automatically determine the current month and year and insert them in the file name?