>That stops the error message, but I'm trying to find a way to stop the execution of a long loop in the command.click() event, such as by pressing "Q" or something. I have this in the command.keypress() but it's not working:
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>if inlist(nKeyCode,81,113)
> release thisform
>endif
You can put a DOEVENTS() in the loop to tell VFP to process keyboard and mouse events. In a method triggered by your 'escape' key, set a form property, and check that property in your loop:
For i = 1 TO Whatever
DOEVENTS()
IF THISFORM.UserCancelled
EXIT
ENDIF
ENDFOR
Erik Moore
Clientelligence