Importing excel spreadsheet- zip code data

M

Meryl

I'm having trouble importing an excel spreadsheet that
has a cell formatted for zip code. The cell appears
correctly. (It is set for 5 digit zip code)

When I import it into an access table (text field), the
leading zeroes in the zip are deleted. How can this be
corrected?

This is the input mask I have for the access zip code
field:

00000\-9999;;_

Thx.
 
K

Ken Snell

ACCESS is seeing the zip code field as a numeric format, not a text. This is
because ACCESS sees the type of value, not the type of format that you've
put on the EXCEL cell.

You can put ' characters in front of the zip codes; that will tell ACCESS
that it's a text format.

Or you can import the data to a temporary table, and then use an append
query to copy the data to the real table; use a calculated field for the zip
code:
ZCode: Format([ImportedZipCode], "00000")
 

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