Accesss to Comma Delimited Problem

  • Thread starter Thread starter Rick Elbanna
  • Start date Start date
R

Rick Elbanna

i have about 8 or 9 access databases that needed to be converted to comma
delimited text files. i did the conversion and the weirdest think that i
have never seen before happened. every text file i created, when ever there
is a number, it added .00 to it, every think, numbers, years, telephone
numbers, fax numbers, you name it. for instanced, a year would be 1997.00, a
phone number would be 732-615-98709.00 and so on, which of course ruined
everything and made is unusable in many ways. any solution or ideas please??
 
Use TransferText action (via macro or VBA code) to do the export. Also use
an export specification for the export. The specification will let you tell
ACCESS how to format each of the fields' data being exported.

You can set up an export specification by doing the export manually -- and
then, on the last screen of the wizard window, click the Advanced button at
bottom left of the screen. A screen will display that allows you to set the
data type, etc. of the individual fields. You then can save that
specification with any name you wish. You then can cancel the export that
you'd begun.

Then use this export specification name as the "Specification" argument of
the TransferText action.
 
thanks ken, but i don't know how to use transfer text acion via vba, that is
the problem
 
It's fairly easy to do.

DoCmd.TransferText

It has a number of arguments. Open the Visual Basic Editor (Tools | Macro |
Visual Basic Editor or Alt+F11) and the open Help file from there. Use
index to go to DoCmd and then you'll find it there as one of the methods.


Alternatively, create queries that use calculated fields in place of the
real fields from the tables, and use the Format function to specifically
"cast" the outputs the way you want them to be.
--

Ken Snell
<MS ACCESS MVP>
 

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

Back
Top