Exporting From Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have imported data in to an access database, and formatted the fields to
add leading zeros to a column which works fine, the zeros appear in the
table. I now need to export that data in a csv format, but the zeros do not
appear when I do the export. I have tried running a query and exporting that,
but have the same problem. How do I export to include the format that I set
on Import.

Thanks

Neil Hunt
 
If you're talking a numeric field, the zeroes aren't really there in Access:
formatting a field does not change the underlying value, and 001 is the same
as 01 is the same as 1 when you're talking numbers.

Use the Format function in your query (as opposed to setting the Format
property of the field):

SELECT Format(Field1, "00000"), Format(Field2, "0000"), ... FROM MyTable
 
Back
Top