CreganTur
03-25-2008, 07:42 AM
I'm using this VBA function to export the results of a Query to Excel:
'Export Global report to Excel
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"qryNoResultsGlobal", "C:\NoResultsGlobal", True
I want to adjust the Filepath so that the current date (in the dd-mm-yy format) will be added to the end. ie: "C:\NoResultsGlobal 03-25-08"
I tried concatenating the Filepath with the Date variant [ "C:\NoResultsGlobal" & Date]
I tried using a variable:
Dim cdte As Date
'Export Global report to Excel
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"qryNoResultsGlobal", "C:\NoResultsGlobal" & cdte, True
So far nothing's working.:dunno
'Export Global report to Excel
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"qryNoResultsGlobal", "C:\NoResultsGlobal", True
I want to adjust the Filepath so that the current date (in the dd-mm-yy format) will be added to the end. ie: "C:\NoResultsGlobal 03-25-08"
I tried concatenating the Filepath with the Date variant [ "C:\NoResultsGlobal" & Date]
I tried using a variable:
Dim cdte As Date
'Export Global report to Excel
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"qryNoResultsGlobal", "C:\NoResultsGlobal" & cdte, True
So far nothing's working.:dunno