Occasionally my MS Access reports:
The search key was not found in any record
After this happens the solution is to close Access, compact and repair the backend and then delete the record.
What causes this and how can I avoid it?
Occasionally my MS Access reports:
The search key was not found in any record
After this happens the solution is to close Access, compact and repair the backend and then delete the record.
What causes this and how can I avoid it?
It sounds like you might have a corrupt database. One way you might be able to identify the source (especially if its something in the application portion of it) is to use the no-so-documented /decompile command it (make a backup firs of course); and then recompile it in the VBA side using the Debug->Compile command.
From there, it would be a matter or replacing the corrupt object (form/report/module).
Another possible cause of this error is a mismatched workgroup file. That is, if you try to use a secured (or partially-secured) MDB with a workgroup file other than the one used to secure it, you can trigger the error (I've seen it myself, years ago with Access 2000).
In Access 2007 this error occurs when importing an Excel file where there are two fields with the same column header.