date as filename

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
 
K

Ken Snell [MVP]

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top