>Long Way: > >1. Retrieve table1.inci_id field from all records in table1 where > table1.inci_id = thisform.pcInci_Id > or table1.inci_Id = thisform.pcParent_Id > or table1.parent_id = thisform.pcInci_Id > or (LEN(table1.parent_id)>0 AND table1.parent_id = thisform.pcParent_Id) > >2. Get all fields in all records in table2 where > table2.inci_id is in (the cursor result created in step 1) >>
select * from Table2 where exists (select * table1 where table1.inci_id = thisform.pcInci_Id or table1.inci_Id = lnParm1 or table1.parent_id = lnParm2 or (LEN(table1.parent_id)>0 AND table1.parent_id = lnParm2))