>VFP9SP2
>
>Hi,
>
>I would like to conditionaly stop a scan. The easiest way would be to {set escape on} and invoke the ESC key. However the application rules that 'settings' should not be used. Do we have an other option?
>
>Regards,
>
>Koen
If SET ESCAPE is already off I seem to remember doing it this way back in the dBase era and it still works
USE myTable
SCAN
IF INKEY() <> 27
Do whatever
ELSE
?"STOPPED"
EXIT
ENDIF
ENDSCAN
?"DONE"