Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Conversion Failure 1

Status
Not open for further replies.

adrikev

Programmer
May 17, 2002
36
US
I'm importing Excel files via the TransferSpreadsheet method in a mod function:

DoCmd.TransferSpreadsheet acImport, 8, "tblImport", sFileName, True

One of the fields that is being imported is a zip code field. Some of the zip codes are Canadian consisting of alpha and numeric characters (i.e. L6Y2K4). I'm receiving a Type Conversion Failure on this field for all alpha numeric zip codes.

I have tried text and memo Data Types and still get the same error. Field size is set to 50 so that shouldn't cause a problem either.

This column in the Excel file has a format property of text.

Anyone else run into this problem? Any comments? Thoughts?

Thanks --------------------------------
Fortius, Citius, nullis secundus
Strength, Speed, second to none
 
Out of curiosity what is the first zip that is imported?
If the first zip is a numeric access sees the "type" as numeric.
Try having the first zip listed in the spreadsheet being Canadian. See if the same happens.

Rhonin
"too many questions, too little time..."
 
Thanks for the information. Problem solved!! --------------------------------
Fortius, Citius, nullis secundus
Strength, Speed, second to none
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top