Hi all.
I am running an Access 2003 report that outputs to an Excel Spreadsheet
The parameter query has two paramerters First Date and Last Date.
The report runs from an Button OnClick event.
I need to include the two dates in the 'name' of the spreadsheet as below
Private Sub btn_report_between_dates_Click()
DoCmd.OutputTo acOutputQuery, "qry_all_calls_between_dates", acFormatXLS, "Calls By Between Dates " First Date" and " Last Date" - Date Report Run " & Format(Date, "dd-mm-yyyy") & ".xls", True
End Sub
Can this be done? (btw I know it is preferable to use the TransferSpreadsheet method, but I've not got around to that way yet)
Thanks in advance
I am running an Access 2003 report that outputs to an Excel Spreadsheet
The parameter query has two paramerters First Date and Last Date.
The report runs from an Button OnClick event.
I need to include the two dates in the 'name' of the spreadsheet as below
Private Sub btn_report_between_dates_Click()
DoCmd.OutputTo acOutputQuery, "qry_all_calls_between_dates", acFormatXLS, "Calls By Between Dates " First Date" and " Last Date" - Date Report Run " & Format(Date, "dd-mm-yyyy") & ".xls", True
End Sub
Can this be done? (btw I know it is preferable to use the TransferSpreadsheet method, but I've not got around to that way yet)
Thanks in advance