export - no leading zeros

H

Henry

Hi, I am exporting data from a table to a fixed-width text file using an
export spec.

One field I export is a text datatype, but it does only contain numbers. I
used a text datatype because I need to preserve the leading zeros. The end
result is the text file has stripped away the leading zeros...........why??

The export wizard shows them along the way........

I am using Access 2002

Thanks
Henry
 
J

Jeff Boyce

Henry

Consider creating a query that collects the information you'll be exporting.
On the text field with numbers, convert the field explicitly to
characters/text using the CStr() function (e.g., one of the query output
fields would look something like: ThisOutput: CStr([YourField])). Then
export the query.

Also consider checking the field-type the export specification is using for
this field -- it sounds like this is being exported as a numeric value.

Good luck

Jeff Boyce
<Access MVP>
 

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