DO WHILE .T. SELECT SometableToScan GO TOP SCAN * Do Whatever IF <i>RestartScanNeeded</i> EXIT ENDIF ENDSCAN ENDDOObviously, you need something to exit from the DO WHILE .T. loop at some point. Also, note that this looping may be tight, and you may need to explicitly put a DOEVENTS() somewhere to let VFP respond to UI events intermittently, which will degrade the loop performance a bit.