date as filename

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

Using the following code -

Dim path As String
Dim wShell As Object 'New wshShell
Set wShell = CreateObject("WScript.Shell")
path = wShell.SpecialFolders("Desktop")
Set wShell = Nothing
DoCmd.TransferText acExportDelim, , "qryexportcsv", path
+ "\export.csv", True

how do I get the csv to be aclled the current date.csv?

thanks
Rob
 
DoCmd.TransferText acExportDelim, , "qryexportcsv", path
+ "\export" & Format(Date(),"mmddyyyy") & ".csv", True
 
Back
Top