How To: Run TransferText Method on SQL string (instead of actual query)
Posted on 2005-04-19
I would like to run the following TransferText command on an SQL string, which I know works (I can execute the SQL string).
DoCmd.TransferText acExportDelim, , "qryJournalMailing1", "c:\JournalSubs1.txt", True
When I replace "qryJournalMailing1" with my SQL string:
Dim db As Database
Dim strSQL1 As String
Set db = CurrentDb()
strSQL1 = "SELECT......."
DoCmd.TransferText acExportDelim, , "strSQL1", "c:\JournalSubs1.txt", True
I suspect "strSQL1" has to be something other than a string.....