Adding 0 into the records in a column

K

Kath

I have a table that have zipcodes imported from Excel.
Unfortunately, wherever we got the original data from, the
data wasn't input in the 5 digit format. Therefore, when
i imported the data, the zipcodes that start with a 00 or
0 all of sudden are without the 0s. Is there a quick
format to fix that?

Thanks,

kath
 
R

Ron Hinds

Sounds like the field you imported to was numeric. You should change the
data type to a text field instead. That will preserve the leading 0's when
you import. If you ever plan to ship to Canada or the UK, you would need
text anyway!
 
G

Guest

Hi,

there are several possibilities :
1. put in a single apostroph in front of the ZIP codes in Excel, then the
field is treated as text, depending on the amount of rows it would possibly
make to much work, therefore

2. put in under the heading row, i guess there is one, a row where in the
ZIP code column is a text entered, could be e.g. 'a' then the whole column
should be imported as text and you will only have to delete that additional
row in Access later on. During the import Access analyses approx. the first
15 rows what kind of data is in there and determines the type (numeric, date,
text, etc.) of it.

3. As Ron mentioned you have imported to a numeric field. Change the display
format to something like 00000 for the ZIP code filed in your table - have a
look in Access help what is possible. If you don't want to send Mails etc. to
e.g. Canada or UK you won't probably need to change the type to text. If you
change to text you will always need to check the number of digits entered and
add the leading 0's.

HTH,
Bernd
 

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