Make snapshots with variable names

bobfin

Registered User.
Local time
Today, 11:19
Joined
Mar 29, 2002
Messages
82
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?
 
Code:
DoCmd.OutputTo acOutputReport, "DailyStats", acFormatSNP, "C:\Stats\" & Forms!frmRptDate.txtDailyName, False
 
Thanks.

Thanks, that syntax worked with the OutputTo method.
 
Database engine cannot lock table

Hi, I'm trying the same syntax but it says:
The database engine could not lock tblOrders because it is already in use by another person/process.
The Report is based on a query qryCurrentOrders as the record source and qruCurrentOrders checks for a DummyReport to be checked which is checkd on the FormCurrent event.
Please help.
Thanks,
Sudhir.
 

Users who are viewing this thread

Back
Top Bottom