TransferText and FileStream Incompatibility... [modified]
-
Is it possible to utilize the TransferText function from a database table in MS Access to a TextFile object? I need to be able to write three lines of code to a file and then transfer the records from the database table to the very same file utilizing the TransferText approach because the file needs to be presented in a certain way to the .CSV file. Is this possible? I would appreciate any assistance you could provide. Here is the code so far:
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(strNewOutputString, True)
strDatePicker = dteDatePicker.Value
dteMonth = Month(strDatePicker)
a.WriteLine ("ACTUALC")
a.WriteLine (dteMonth & ",,")
a.WriteLine (dteMonth & ",,")'Needs to be able to transfer the text in this format using the "Standard Output" specification format. DoCmd.TransferText acExportDelim, "Standard Output", \_ "tblExportCSV", strNewOutputString, False a.Close
modified on Friday, December 14, 2007 12:53:54 PM