Leading zeros in export

  • Thread starter Jim Burke in Novi
  • Start date
J

Jim Burke in Novi

I am exporting a table to a CSV text file. I need one of the fields to have a
leading zero in it. I have it defined in my table as a text field with a
length of 2. I look at the data that is being exported, and it has "01" in
the field (I format it that way when I create the table entries), but when
the export is done the leading zero is stripped away and I end up with "1".
Is there any way to prevent this? This CSV file is being sent to someone else
and I need to keep the leading 0 in because of the way they process data on
their end. Any help is appreciated. Thanks.

Jim B
 
D

Douglas J. Steele

Create a query, and use the Format function in the query (as opposed to
setting the Format property of the field in the query).

Export the query, not the table.
 
J

Jim Burke in Novi

That did it. Thanks! Odd that it doesn't work coming from the table, when
it's a text field I created using the Format function in the first place.
 

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