Local lcFromForm,lcToForm lcFromForm = 'myForm1.scx' lcToForm = 'myForm2.scx' Select * From (m.lcFromForm) ; where ; (Trim(Lower(Class)) == 'dataenvironment' Or ; Trim(Lower(Parent)) == 'dataenvironment') ; into Cursor d1 ; nofilter Use In (m.lcFromForm) Use (m.lcToForm) In 0 Exclusive Alias ToSCX Select * From ToSCX Where Recno()=1 Into Cursor c1 nofilter Select * From ToSCX Where Recno()#1 And ; !(Trim(Lower(Class)) == 'dataenvironment' Or ; Trim(Lower(Parent)) == 'dataenvironment') ; into Cursor c2 ; nofilter Select ToSCX Zap Append From Dbf('c1') Append From Dbf('d1') Append From Dbf('c2') Use Use In c1 Use In c2 Use In d1Cetin