Discussion Locked

Error Handling

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I do an error handling message in a delete code, when all fields are deleted?

7 replies

by sl-campbell

Sorry, I am not sure what you are asking for, or rather I do not know how you are doing the deletion and with what program?
What do you mean by error handling? System, DAO/ADO, or do you want to raise your own error and if so, then under what cercumstances?
Is this a bulk deletion? (DELETE * From Table). If so, then make sure you use the option: dbFailOnError.

Or are you are trying to say: When I delete records in a loop and there are no records to delete then an error occurs on the Delete command? If so, then always do a check on the BOF and EOF first to see if there are any(more) records to delete and after a delete move off the deleted record with MoveNext.

Other than that, just set an On Error Goto ... statement at the begining of the proceedure.

Please let me know!

This discussion is closed to new replies.