By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,378 Members | 3,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,378 IT Pros & Developers. It's quick & easy.

Creating tab delimited file

P: n/a
I'm using the Write # statement to create a csv export file from Access 2K

Some of the data has embedded quotes in it and it doesn't import into
QuickBooks correctly.

An inventory part with a name of 1/4" Pipe gets truncated to 1/4
with csv

Can I create a tab delimited file with Aceess and include the quote mark.

Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
you could loop through all the records and then loop through the fields
in the recordset... something like:

do until rst.EOF
for intCounter=0 to rst.fields.count-1
if intCounter=0 then
strLine= rst.Fields(intCounter)
else
strLine = strLine & vbtab & rst.fields(intCounter)
end if
next intCounter
'---write your string to your text file
write #1 strLine
rst.MoveNext
loop

you could grab the code Albert Kallal wrote and do the same thing. He
wrote code that basically does this... dig around here for his
website...

Nov 13 '05 #2

P: n/a
"Karl Irvin" wrote
I'm using the Write # statement to
create a csv export file from Access 2K
Some of the data has embedded quotes
in it and it doesn't import into
QuickBooks correctly.

An inventory part with a name of
1/4" Pipe gets truncated to 1/4
with csv

Can I create a tab delimited file with
Aceess and include the quote mark.


Yes, but whether that would import would depend on QuickBooks. An easier
approach would be to double the included quote marks -- that is a convention
_most_ software uses in such situations.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #3

P: n/a
Thanks but the problem is the Write # statement which logically looks at an
embedded quote in a field as the end of the field. I'm looking for an
alternative that will allow me to embed the quote. I think a tab delimited
file may be the answer but I don't know for sure and I don't know how to
create one on using Access.

<pi********@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
you could loop through all the records and then loop through the fields
in the recordset... something like:

do until rst.EOF
for intCounter=0 to rst.fields.count-1
if intCounter=0 then
strLine= rst.Fields(intCounter)
else
strLine = strLine & vbtab & rst.fields(intCounter)
end if
next intCounter
'---write your string to your text file
write #1 strLine
rst.MoveNext
loop

you could grab the code Albert Kallal wrote and do the same thing. He
wrote code that basically does this... dig around here for his
website...

Nov 13 '05 #4

P: n/a
Use the Print statement instead of Write.

Nov 13 '05 #5

P: n/a
Larry Linson wrote:
> Aceess and include the quote mark.


Yes, but whether that would import would depend on QuickBooks. An easier
approach would be to double the included quote marks -- that is a convention
_most_ software uses in such situations.

Larry Linson
Microsoft Access MVP


I have used Access to create tab-delimited files for importation into
QuickBooks. Quotes in fields come in no-problemo and tab-delimited is
very easy to do with the Print command. Tab-delimited format is at
least as ubiquitous as doubling quote marks especially in older
software. So if what Larry said doesn't work for you I recommend
creating a tab-delimited file.

James A. Fortune

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.