Exporting Delimited Text File Truncating

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

I am exporting a table from Access to Txt using a Macro
and the TranferText command - Delimited, however Number
fields which contain more than 2 decimal places are
truncated at 2 Decimals. Is there a setting which will
allow me to create the text file at a set number of
decimals eg 4 - using a specification for the export but
nothing is obvious. Help Please

Craig
 
Build a query and use Format function. Then export the query.

If your field is character based and needs to be right justified try:
Field: MyRightText: Right$(Space(10) & MyField,10)

If your field is numeric and needs leading zeroes use a similar technique to
return leading zeroes.
Field: MyRightText: Right$("0000000000" & MyField,10)

For decimal problems:
Create a query with the fields that you want to export and use the Format()
function to specify the number of decimal places in the number field. For
example, if your field has 4 decimal places, the column in the query grid
would look as follows:

Field: Format([MyField],"##0.0000")
 
Back
Top