I'm trying to automate the creation of report snapshot whose name will vary each day. The snapshot name is in a textbox on a form. I have a macro that opens this form (hidden) and then uses OutputTo to make the snapshot. I tried the OutputTo action and got a file whose name was the textbox name. I tried the OutputTo method in a custom function and the computer hung up. Here's the code for the function:
DoCmd.OutputTo acOutputReport, "DailyStats", acFormatSNP, "C:\Stats\[Forms]![frmRptDate]![txtDailyName]", False
The value in txtDailyName is a name like "DailyStats 20061117.snp".
Am I close or should I try a different method?
DoCmd.OutputTo acOutputReport, "DailyStats", acFormatSNP, "C:\Stats\[Forms]![frmRptDate]![txtDailyName]", False
The value in txtDailyName is a name like "DailyStats 20061117.snp".
Am I close or should I try a different method?