Create Comma Quote Deliminated Txt File

  • Thread starter Matt via AccessMonster.com
  • Start date
M

Matt via AccessMonster.com

Hi -

I would like to create a comma, quote deliminated text file using VB in
Access.

Currently I am using a macro to create a deliminated text file. However each
field needs to be separated by a comma and the character strings must be
enclosed in double quotes. After the text file is created, I then have to
open the text file in editor and do a find and replace double comma's and
replace them with ,"", (comma double quote comma).

Does anyone have suggestions on how I can automate this process?

Thanks
Matt
 
J

John Nurick

Hi Matt,

The simplest thing is usually to create a query uses calculated fields
to ensure that every output field is text. Then when you export the
query using TransferText in the usual way, all the fields are
automatically qualified with quote marks.

Examples of the calculated fields you'd use:

Numeric ID field:
fID: CStr([ID])

Numeric field formatted with three decimal places:
fNum: Format([Num], "0.00")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top