FUNCTION myFunc PARAMETERS myID SELECT myDBF SET ORDER TO TAG myField = SEEK(myID) SCAN WHILE myDBF.myField = myID SELECT myOtherDBF *** myOtherDBF manipulation logic goes here SELECT myDBF DELETE ENDSCANThis fails, what am I doing wrong. Just change the WHILE to FOR, though slower will never fail.