Query to Excell

TheHub

Registered User.
Local time
Today, 17:38
Joined
Jun 22, 2012
Messages
30
Hi. I know how to export a query result to an Excel spreadsheet, using the DoComd as this DoCmd.OuputTo acOutputQuery, "#query_name#", acFormatXLS, "#excel_sheet_title.xls#", True. My problem (if you can call it that) is how to append the current date to the name of the spreadsheet. eg DoCmd.OuputTo acOutputQuery, "qry_query_all", acFormatXLS, "Query_all.xls", True.... so the spreadsheet would be Query_all_03072013.xls. Thanks in advance :banghead:
 
Brilliant !! Worked 1st time. Many thanks
 

Users who are viewing this thread

Back
Top Bottom