Hi
I have a button on a form which runs a query, exports the data to csv and then opens that file in excel for checking.
This is my code which works great:
Private Sub RunStatements_Click()
DoCmd.TransferText acExportDelim, , "StatementReport", "G:\jobs.csv", True
Call Shell("""C:\Program Files (x86)\Microsoft Office\Office12\excel.exe"" ""G:\jobs.csv""", vbNormalFocus)
End Sub
What i would like to do is after the file is exported to csv, rather than open the file I would like it uploaded to a server, after some searching it seems that FTPPutFile would be the way to do this but I cannot find anything which is simple enough for me to understand how to execute this.
If anyone is able to modify my code to make this work I would be most grateful.
Thanks
I have a button on a form which runs a query, exports the data to csv and then opens that file in excel for checking.
This is my code which works great:
Private Sub RunStatements_Click()
DoCmd.TransferText acExportDelim, , "StatementReport", "G:\jobs.csv", True
Call Shell("""C:\Program Files (x86)\Microsoft Office\Office12\excel.exe"" ""G:\jobs.csv""", vbNormalFocus)
End Sub
What i would like to do is after the file is exported to csv, rather than open the file I would like it uploaded to a server, after some searching it seems that FTPPutFile would be the way to do this but I cannot find anything which is simple enough for me to understand how to execute this.
If anyone is able to modify my code to make this work I would be most grateful.
Thanks