I am not sure if I understood correctly. But if, when you delete a record in one table, you want to automatically delete related records in other tables, you can use referential integrity, with a cascading delete. This means almost no work for you! Visual FoxPro will generate all the required code.
>Dear Experts
>
>I have four dbf's as follows
>
>Fixbook, index bill_no
>Vouchers, index vou_no
>Vou_sum, index vou_no
>Fixbill, index bno
>
>Data in all dbf's is about similar.
>To delete a record from all dbf's I use following command
>But the problem is when I issue command the data from only first dbf, Fixbook, is deleted and in other theree dbf's remain same as previous.
>
>In Vouchers.dbf there is double entry of any vou_no, DR & Cr. and other
>three dbf's has single entry.
>
>Please enable my codes to delete same vou_no from all four dbf's.
>
>Thanks in advance
>
>SELECT FIXBOOK
>SCATTER MEMVAR
>ACC_CODE2 = m.ACC_CODE
>CODE2 = m.ACC_CODE
>DATE1 = m.FIX_DATE
>VOU_NO2 = m.VOU_NO
>VOU_NO1=THISFORM.TEXT12.VALUE
>
>DELETE FOR BILL_NO=VOU_NO1
>PACK
>
>SELECT VOUCHERS
>DELETE FOR VOU_NO=VOU_NO2 .AND. VOU_TYPE='PR' .AND. DATE=DATE1
>PACK
>
>SELECT VOU_SUM
>DELETE FOR VOU_NO=VOU_NO2 .AND. VOU_TYPE='PR' .AND. DATE=DATE1
>PACK
>
>SELECT FIXBILL
>DELETE FOR BNO=VOU_NO1
>PACK
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)