Hello,
I have a master detail table relationship say, Mastertable (Primarykey1) and Detailtable1(Foreignkey1=Primarykey1), Detailtable2 (Foreignkey2=Primarykey1)..... etc. Before deleting a row from Mastertable I want to (1) insert the related records of Detailtable1 and Detailtable2 into BackupDetailtable1 and BackupDetailtable2 respectively, (2) delete related records of Detailtable1 and Detailtable2. (I could do it at the database level if I didnt need to insert the related records if detailtables into backupdetailtables.)
I could do the above by adding codes for each of the detail tables in the BeforeDelete event. However, I don't want to hardcode this process for every detail table. So, I need to get the list of detail table list of the Mastertable so that I can pass the list in the BeforeDelete and then process for each of the detail table. Could you please help me with this problem?
Thax in advance.