import zipcode from excel to access with leading 0

D

Dawn

I am importing an Excel spreadsheet into a table in Access. I'm having a
problem with the zipcode field. If there is a zero in the beginning, it
doesnt show up in the Access table. I made sure it was listed as a TEXT
field and not a Number field. Is there any way to fix this?
 
K

Ken Sheridan

After the import you can make sure that all the Zip values are in the correct
5-digit format by running an update query, e.g.

UPDATE MyTable
SET Zip = Format(Zip,"00000");

so anything imported as 1234 will become 01234.
 
Top