Export delimited text file

G

Guest

When exporting a text file from Access as a delimited text file, it will
change the decimal values in the table to a different value then displayed in
the document. How do I keep the value the same without it being changed
during the exporting process? And why does it do this?
 
K

Ken Snell \(MVP\)

You must use a calculated field in your exported query that will "set" the
number of decimal places that you want -- this calculated field replaces the
original field. Let's say your original query was this:

SELECT Field1, Field2
FROM Tablename;

And let's say Field1 is the one you want to have 5 decimal places:

SELECT Format(Field1, "0.00000") AS NewField1, Field2
FROM Tablename;

ACCESS defaults to two decimal places for numbers when exporting to text
files. It also defaults to give you date and time values for date/time
fields even if you are only storing date values in the fields, etc.
 

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