non-imported fields with errors

  • Thread starter Thread starter Claire
  • Start date Start date
C

Claire

I am using a saved import to import selected fields from an excel database
into access. Everything imports into the appropriate table correctly, but I
receive an error list that includes type conversion errors for multiple
fields that are not imported. It's not a huge problem to just delete this
each week when I re-import, but it is more difficult to find what are actual
errors, and other people may have to perform this import who would be caught
off guard by the errors.

Two fields that consistently receive errors are Y and blank fields in excel
that I have tried to import into access as both y/n fields and as text
fields. The other error appears to be on a function in excel (a choose
character with Right and Left functions).
Any ideas of how to fix this problem? Or how to tell access not to send
error reports for fields that are not imported?

Thanks.
 
Easy way to hide all these warnings is by using function
DoCmd.SetWarnings False
'code to import your file
'once imported go ahead and delete conversion error table
DoCmd.DeleteObject acTable, [objectname]
' and then
DoCmd.SetWarnings True

But if I was in your place I would really like to find out reason and
solution for coversion errors, maybe importing in temp table and then sort it
all out and then append to right table.

good luck

Amir
 
Thanks for your thoughts, Amir. There are some errors that are applicable in
imported fields, so I'd rather not disable all the error messages. And as
you said, the best scenario would be to figure out why these errors are
there in the first place. Does anyone else have a thought?
 
Did you happen to try to import to new table, meaning let the import
procedure create the brand new table and import data. I'm thinking that if
this works you can then see how the field types in new table differ by size
and type from the one you are currently trying to use.
I used this trick once or twice when I couldn't figure out what the issue
was with conversion error.
Hope that helps

Amir

Claire said:
Thanks for your thoughts, Amir. There are some errors that are applicable in
imported fields, so I'd rather not disable all the error messages. And as
you said, the best scenario would be to figure out why these errors are
there in the first place. Does anyone else have a thought?


DrEvil said:
Easy way to hide all these warnings is by using function
DoCmd.SetWarnings False
'code to import your file
'once imported go ahead and delete conversion error table
DoCmd.DeleteObject acTable, [objectname]
' and then
DoCmd.SetWarnings True

But if I was in your place I would really like to find out reason and
solution for coversion errors, maybe importing in temp table and then sort it
all out and then append to right table.

good luck

Amir
 
Back
Top