import zipcode from excel to access with leading 0

G

Guest

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?
 
G

Guest

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.
 

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