S
snooka9
~Office XP~
I've come across a problem when I try to import some Excel s/sheets with
social security numbers using DoCmd.TransferSpreadsheet. I have a table
created with various fields, one being the SS# as a Text field, and I first
run a delete query to 'clear' it before every import. Example:
DoCmd.SetWarnings False
DoCmd.OpenQuery "DELETE EE_Import_Table"
DoCmd.TransferSpreadsheet acImport,
acSpreadsheetTypeExcel9, "EE_Import_Table", fileName, True
DoCmd.SetWarnings True
I receive employee data from various sources in an Excel s/sheet which I
import into Access. 99% if the time it works fine but on occasion It will
create the "Sheet1$_ImportErrors" table with the error "Type Conversion
Failure" for some SS#s.
When I get these troublesome files I've tried formatting the SS# column in
Excel in various ways (other than 'Number' because then leading zeros are
dropped from some SS#s) and I can't seem to find a way to correct the issue.
Access will just keep importing those strange SS#s as blank and creating the
"Sheet1$_ImportErrors" table no matter what format I choose (or so it seems).
Any ideas on why this is happening and what I can do to alleviate the problem?
Thanks in advance.
..
I've come across a problem when I try to import some Excel s/sheets with
social security numbers using DoCmd.TransferSpreadsheet. I have a table
created with various fields, one being the SS# as a Text field, and I first
run a delete query to 'clear' it before every import. Example:
DoCmd.SetWarnings False
DoCmd.OpenQuery "DELETE EE_Import_Table"
DoCmd.TransferSpreadsheet acImport,
acSpreadsheetTypeExcel9, "EE_Import_Table", fileName, True
DoCmd.SetWarnings True
I receive employee data from various sources in an Excel s/sheet which I
import into Access. 99% if the time it works fine but on occasion It will
create the "Sheet1$_ImportErrors" table with the error "Type Conversion
Failure" for some SS#s.
When I get these troublesome files I've tried formatting the SS# column in
Excel in various ways (other than 'Number' because then leading zeros are
dropped from some SS#s) and I can't seem to find a way to correct the issue.
Access will just keep importing those strange SS#s as blank and creating the
"Sheet1$_ImportErrors" table no matter what format I choose (or so it seems).
Any ideas on why this is happening and what I can do to alleviate the problem?
Thanks in advance.
..