wingforward
Registered User.
- Local time
- Today, 09:58
- Joined
- Nov 24, 2009
- Messages
- 27
I'm trying to create a routine that will export query results to a csv.
This is the code I have so far, but the TransferText command isn't working.
DesktopPath() is a function returning the, surprise, Desktop Path.
Dim strQueryName As String
Dim strFileName As String
Dim strDir As String
Dim strFilePath As String
strQueryName = "qryConstantContact"
strFileName = "CC_Upload.csv"
strDir = DesktopPath()
strFilePath = strDir & strFileName
DoCmd.TransferText acExportDelim, , strQueryName, strFilePath, "True"
This is the code I have so far, but the TransferText command isn't working.
DesktopPath() is a function returning the, surprise, Desktop Path.
Dim strQueryName As String
Dim strFileName As String
Dim strDir As String
Dim strFilePath As String
strQueryName = "qryConstantContact"
strFileName = "CC_Upload.csv"
strDir = DesktopPath()
strFilePath = strDir & strFileName
DoCmd.TransferText acExportDelim, , strQueryName, strFilePath, "True"