Importing data from Excel 2007 to Access 2007 - dropping leading zeros in text field

I'm trying to import Excel 2007 data into Access 2007 - one of the fields requires leading zeros.  The import data shows the leading zeros in a text field.  Access is also defined as a text field and is dropping the leading zeros.  This process worked fine with Office 2003 software.

I have tried to format the text field in Access.  I can type in the leading zeros or do a replace which saves the leading zeros, however, Acess deletes the leading zeros when imported.

Excel data = 00055239
Import to Access = 55239
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I have had this problem going from Access to Excel, but not the other way.  Is your data in Excel preceeded by an "'" (apostrophe)?  In the import specification, is the data column defined as text?

You could fix this with an update query after the import with this function:  field1=right("0000000" & field1,8).  This would create the string "000000055239", then keep only the rightmost 8 characters leaving you with "00055239".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FredFiveAuthor Commented:
The Excel data does not have appostrophes.  Both Excel and Access fields are defined as text.

Excel data = 00055239
Import to Access = 55239
Jeffrey CoachmanMIS LiasonCommented:

You never stated how you areactually importing these files.

This works fine for me with no issuse at all.
I am simply using the Import wizard in Access 2007.

I am using *Native* Access 2007 and Excel 2007 files here (I had to change the extensions to post them here.)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.