Export numeric field to text file with 5 decimal places

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

Guest

When I try to export a query to a text file, the numeric data that is
exported truncates after two decimal places even though the query displays
the data with 5 decimal places. Is there a way to export numeric fields with
more than two decimal places without changing the field a text field?
 
Chad,

The format on the query field won't work, but this will: in your query,
use a calculated field like:

Expr1: Format([YourOriginalFieldName], "0.00000")

HTH,
Nikos
 
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