Hi all,

I have many tables most of which are related in one way or another. I have cascade delete / update turned on. As a result, when deleting one record, there is potential for records in multiple tables associated with that record to be deleted.

I would like to run some sort of check prior to each delete to let the user know what the consequence is if they delete the record. Or, if there are associated records then the delete shouldn't be able to happen.

Do I have to run a query on each table individually or is there a dynamic way of doing this? Perhaps a property of the field that can tell me whether there are currently associated records (I guess records with the associated foreign key) that will be affected by the delete?

I appreciate any help in advance,

Thank you.