Originally Posted by boblarson
Again, this is an old post but I'll post an answer in hope of helping someone at a later date.
You can easily add an error handler and trap for error 3021 and then just exit the sub or function when you encounter it.
What the solution to add / change codes to prevent it crash - how to do it
If Not rsContacts.EOF Then
'save the id of the current (next)record
intCurContact = rsContacts!PCNumber
error didplay: runtime error 3021 - either BOF or EOF is TRUE or the current has been deleted