I want to export some access table data into a *.csv file. I wrote the following script:
Sub ExportAllTables()
Dim objAccess As AccessObject, obj As Object
Set obj = Application.CurrentData
Dim strFile As String
'loop through all the tables in the db and export the data
For Each objAccess In obj.AllTables
strFile = "C:\" & objAccess.Name & ".csv"
'if it is not a microsoft system table then export
If (StrComp(Left$(objAccess.Name, 4), "MSys", vbTextCompare) <> 0) Then
DoCmd.TransferText acExportDelim, , objAccess.Name, strFile, False
End If
Next objAccess
End Sub
Ok, that works great. The problem is I want to export the text with the text qualifier set to {none}. Currently text in the file looks like this:
1,"Text",121,"More Text"
I want it to look like this:
1,Text,121,More Text
How can I modify my script above to do this generically.
Thanks,
-bitwise
Sub ExportAllTables()
Dim objAccess As AccessObject, obj As Object
Set obj = Application.CurrentData
Dim strFile As String
'loop through all the tables in the db and export the data
For Each objAccess In obj.AllTables
strFile = "C:\" & objAccess.Name & ".csv"
'if it is not a microsoft system table then export
If (StrComp(Left$(objAccess.Name, 4), "MSys", vbTextCompare) <> 0) Then
DoCmd.TransferText acExportDelim, , objAccess.Name, strFile, False
End If
Next objAccess
End Sub
Ok, that works great. The problem is I want to export the text with the text qualifier set to {none}. Currently text in the file looks like this:
1,"Text",121,"More Text"
I want it to look like this:
1,Text,121,More Text
How can I modify my script above to do this generically.
Thanks,
-bitwise