Export table to txt file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the docmd.transfertext function to export a table to a
comma-delimited text file. When doing this, my number field (formatted as
double, fixed, 6 decimal) does not export the correct number of decimal
places.

Does anyone know how I can force the file to export with the 6 decimal places?

Thanks!

Cindy
 
Build a query based on the table. Use a calculated field instead of the
original field that needs to have the desired formatting:

MyNumber: Format([FieldName], "0.000000")

Export the query instead of the table.
 
Ken Snell [MVP]wrote
"]Build a query based on the table. Use a calculated field instead o
the
 
Try putting the field name inside [ ] characters.
Format(PVQSelected.[VALUE],"0.000") AS [VALUE].......

Do not use Value as the name of a table's or query's field. It and many
other
words are reserved words in ACCESS, and can create serious confusion for
ACCESS and Jet. See these Knowledge Base articles for more information:

List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335

List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266

Special characters that you must avoid when you work with Access
databases
http://support.microsoft.com/?id=826763


--

Ken Snell
<MS ACCESS MVP>

kpjamro said:
Ken Snell [MVP]wrote:
"]Build a query based on the table. Use a calculated field instead of
the
original field that needs to have the desired formatting:

MyNumber: Format([FieldName], "0.000000")

Export the query instead of the table.
--
Ken Snell
<MS ACCESS MVP>

I am doing this and it still does not work
(I get 2 decimal places always, I want 3)

my query ....Format(PVQSelected.VALUE,"0.000") AS [VALUE].......

Thanks
 
Ken Snell [MVP]wrote
"]Build a query based on the table. Use a calculated field instead o
the
 
Back
Top