Export numeric field to text file with 5 decimal places

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?
 
N

Nikos Yannacopoulos

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
 
J

Joe Fallon

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")
 

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

Top