S
scorpiorc
I need to export a daily report to a snapshot file, and either have the file
name include the date of the report (which is stored in a table and is not
the current date) or have the used be able to edit the file name before it is
saved. I've written code to add a date to the exported file name. My
problem is the report date is not always the current date or the same number
of days before the current date so I can't use Date() or something like
Date()-2. Here is my code. Any ideas of what I can do?
Function Output_reconciliation_report()
On Error GoTo Output_reconciliation_report_Err
DoCmd.OutputTo acReport, "RECONCILING REPORT", "SnapshotFormat(*.snp)",
"C:\2006\Reports\" & "Reconciling Report " & Month(Date) & "-" & Day(Date) &
"-" & Year(Date) & ".snp", False, "", 0
Output_reconciliation_report_Exit:
Exit Function
Output_reconciliation_report_Err:
MsgBox Error$
Resume Output_reconciliation_report_Exit
End Function
name include the date of the report (which is stored in a table and is not
the current date) or have the used be able to edit the file name before it is
saved. I've written code to add a date to the exported file name. My
problem is the report date is not always the current date or the same number
of days before the current date so I can't use Date() or something like
Date()-2. Here is my code. Any ideas of what I can do?
Function Output_reconciliation_report()
On Error GoTo Output_reconciliation_report_Err
DoCmd.OutputTo acReport, "RECONCILING REPORT", "SnapshotFormat(*.snp)",
"C:\2006\Reports\" & "Reconciling Report " & Month(Date) & "-" & Day(Date) &
"-" & Year(Date) & ".snp", False, "", 0
Output_reconciliation_report_Exit:
Exit Function
Output_reconciliation_report_Err:
MsgBox Error$
Resume Output_reconciliation_report_Exit
End Function