exporting to text file

G

Guest

I am exporting Access 2003 data to a comma delimited text file. One of the
fields called "Units" is numeric data with 4 positions after the decimal
place (eg. 0.0023). If the value of "Units" is more than 0.0100, it exports
as 2 decimal places. If the value is less than 0.0100, it exports as
Scientic Notation. I need all values to export to the full 4 positions. I
have tried exporting the data from a query using the format command
(Unts:Format([Units],"0.0000") as recommended but the data appears in the
resulting text file as scientific notation. I've spent hours researching
this problem and nothing works. Any suggestions?
 
G

Guest

Here's the answer; I finally figured out what's happening:

my query groups and sums the data imported from 3 text files. when I
entered the "format" command into the query and choose "Sum" for this field,
Access changed the "Sum" to "Expression" and wrote the expression as
"Unts:Sum(Format([Units],"0.0000"). The "Sum" command was overriding the
"Format" command. By changing the expression to place the Sum inside the
Format, the data will export as text correctly: e.g.
Unts:Format(Sum([Units]),"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