Hi all,
Using Excel/Access 2007.
I am trying to SELECT all records from a table into a .txt file
The file is ~87 characters long built here:
Code:
'Export File
strExportFile = strDb & "_" & Table.Name & "_Archive_" & Format(Now(), "YYYY.MM.DD_HH.MM.SS")
If Right$(strExportFile, 4) <> ".txt" Then strExportFile = strExportFile & _
".txt"
Debug points to the SQL statement
Code:
conn.Execute "SELECT * INTO [text;HDR=No;Database=" & strArchivePath & _
";Characterset=65001]." & strExportFile & " FROM " & Table.Name
I've tried a few variantions on the Format(NOW()) bit, but I always get the same error.
Any ideas?
Thanks
w