How do i set tab delimiter for csv file in A2k?
How do i set tab delimiter for csv file in A2k?
(OP)
Hi all
I am currently trying to set my export table function to make a .csv file
with tab delimiter. The default is comma which i do not need. I tried
putting the specification Chr(9) for the specification name, but it said
that name is not available for access. Below is my code for my export button
click, it works already as it is but with the comma instead of the tab for
the delimiter.
Oh yeah i'm using access 2000.
strTableName = Me.lst_Export_Tables
DoCmd.TransferText acExportDelim, , strTableName, "C:\BookShop\Exported.csv"
Many thanks in advance
Xiang
I am currently trying to set my export table function to make a .csv file
with tab delimiter. The default is comma which i do not need. I tried
putting the specification Chr(9) for the specification name, but it said
that name is not available for access. Below is my code for my export button
click, it works already as it is but with the comma instead of the tab for
the delimiter.
Oh yeah i'm using access 2000.
strTableName = Me.lst_Export_Tables
DoCmd.TransferText acExportDelim, , strTableName, "C:\BookShop\Exported.csv"
Many thanks in advance
Xiang
RE: How do i set tab delimiter for csv file in A2k?
But you have VBA at your full disposal.
So you will have to write yourself a routine.
Here are the steps:
1. open recordset
2. Open an ASCII file
3. loop through the records
4. get each field you want to export
5. build a string putting a TAB in between each field > Field1 & Chr$(9) & Field2 & Chr$(9) etc
6. Write the string to a ASCII file.
7. repeat loop until all records are written
8. close recordset
9. close ASCII file
DougP, MCP
dposton@universal1.com
Ask me how Bar-codes can help you be more productive.
RE: How do i set tab delimiter for csv file in A2k?
xiang