I am using the DoCmd.TransferText in MS-Access-2010 VBA to export a table to a .csv file. However when I do this the resulting .csv file truncates the information in the table. For example the longitude -85.350223 becomes -85.35. How do I make it where the resulting .csv file is still comma delimited and keeps the full information from the table?
If I need to create an Import/Export specification and reference it in the command line using the SpecificationName feature of DoCmd.TransferText (assuming I have correctly interpreted this feature as a formatting tool) please explain how to do that.
Here is the line I am currently using to export the file to .csv:
DoCmd.TransferText acExportDelim, ,
“AllMetersAvgRSSI”,
CurrentProject.Path &
“\AllMetersAvgRSSI.csv”
I recommend you use this function taken from eraserve:
Here’s how you use/call it:
And here’s the function:
You may also have success by changing the offending fields to text fields, or simply copying them into some temporary text fields before you do the export.