Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stopping A Query
Message
From
13/07/2004 12:34:08
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00923384
Message ID:
00923830
Views:
27
Hi Kevin

You can't have the
ON ESCAPE lCancelled = .T.
because that will prevent the escape from stopping the query. You could have your error trap set lCancelled to .T. when it detects error 1839.

>Mike,
>
>Just before my query, I have:
>
>
>cSaveErr = ON("ERROR")
>SET ESCAPE ON
>SET TALK ON
>SET NOTIFY ON
>ON ESCAPE lCancelled = .T.	
>ON ERROR lError = .T.
>
>
>Just after, I have:
>
>SET TALK OFF
>SET NOTIFY OFF
>SET ESCAPE OFF
>ON ERROR &cSaveErr
>			
>IF lCancelled
>  MESSAGEBOX("Query cancelled by user",64, .Caption)
>ENDIF
>
>
>
>The query continues to run even when I press Escape
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform