Access 2007

Jegajothy vythilingam
Jegajothy vythilingam used Ask the Experts™
on
My OS is windows 7 and I use Access 2007.  I had created a database. and now I was trying to import an Excel spreadsheet, and after selecting the various columns to import, I clicked Finish to import.  But I got an error "The search key was not found in any record".  What is wrong and what have I got to fix in the Excel file. Thank u
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
are you importing to a new table or existing one?

have you tried importing the whole sheet to a new table?
Top Expert 2011
Commented:
- check your column headings, make sure there is no spaces in the field names/column headers in your excel spreadsheet. remove any prefixed space characters if available.
Top Expert 2011

Commented:
- also disable primary key and index temporarily before run the importing the data. after successful import, enable them back again. you might need to check the primary and index key information in your table and cleanup excel data before start importing.

Author

Commented:
In response to OP Zaharin, I think the problem was in one of the heading fields have an extended character "~", which corrupted things, + one field name had a space.  I looked at the VB code, and there were no code or any macros.  Thus, I am still lost on how the error message of "Search key wa not found"  
Top Expert 2011

Commented:
- the "Search key was not found" message indicated a bug in Access 2000. ( http://support.microsoft.com/kb/301474/en-us ) and this bug has been corrected in the latest Jet 4.0 service pack.
- a similar error also documented by Microsoft which is related to indexing ( http://support.microsoft.com/kb/302525 ). both error however is related to Jet driver.
- therefore it is likely the Jet related bug/error trapping during the import procedure itself.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial