質問

The error message "The search key was not found in any record" was appearing on one record of a table in Access 2010.

I first noticed this when accessing that record via an update query, but later found that I also got the same error when trying to delete the record.

What causes this, and how can it be resolved?

役に立ちましたか?

解決

It was just a database corruption, but I was misled by it only affecting one record. A Compact and Repair sorted it immediately.

他のヒント

Sometimes this happens because the field name contains a leading space, ensure your field names are trimmed before and after. Example: It happened to me when I was trying to import an Excel sheet contains the first row as field names, two of the field names was " Latitude" and " Longitude". From this post I knew the problem's cause, so I changed them to "Latitude" and "Longitude" (without the leading space), and the problem was solved.

I know this is an old post, but i just ran into this issue and none of the other answers seemed to solve or address my scenario.

Using a copy of the dbase, i had to continue to delete tables until the error message ceased.

The table at fault was a hidden, system table with the name MSysComplexColumns. I deleted it, closed the dbase and the table was auto-created upon re-opening the dbase. That completed solved it with no side effects.

In my case, this error message was triggered by the size of my Access file. When its size exceeded 2,000,000 KB, the message popped up when I was importing another document. As long as I reduced its size, the message stopped and the import process finished successfully.

Also check the database version. I was having the problem with VBA CreateDatabase(sTempDBName, dbLangGeneral) in Access 2010 where I was using a 2003 database trying to link a table in a 2010 database. When I manually tried the link I got a message about no support for linking to a later version. Creating the temp database I was trying to link to using the option dbVersion40 "CreateDatabase(sTempDBName, dbLangGeneral, dbVersion40)" cured it.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top