Create in root also

robhargreaves

Registered User.
Local time
Today, 00:44
Joined
Mar 4, 2005
Messages
11
Hi

I am using the following code to create a csv file on the desktop using a query

Set wShell = CreateObject("WScript.Shell")
path = wShell.SpecialFolders("Desktop")
Set wShell = Nothing

DoCmd.TransferText acExportDelim, , "qryexportcsv", path + "\export" & Format(Now(), "ddmmyyyy_HH:MM:SS") & ".csv", True

Could someone tell me how I would also make a copy of the file in the root directory in the same event.

Thanks

Rob
 
Add a second TransferText but don't store files in the root directory. Pick some other directory.
 
Your users probably would not want you cluttering up their desktop with a bunch of export files. You choose another fixed directory or create one instead of using their desktop.
 

Users who are viewing this thread

Back
Top Bottom