My goal is the following:
Have a form with a listbox in it. I select and enrtry from it, then press a command button, the record is erased. Deletion is done programatically via a Sub, using an SQL DELETE FROM clause.
When the underlying record to erase exists in other tables, a referential integrity violation message comes up. It appears below. How do I intercept the error generated and substitute it for something custom made that the user can understand.
"Ms Access can't delete 1 record(s) in the delete query du to key violations and 0 record(s) du to lock violations"