Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Event in a form
Message
From
02/05/2001 19:29:17
 
 
To
02/05/2001 17:52:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00502795
Message ID:
00502822
Views:
16
Hi Stephane.

>Is it possible, like with the "ON ERROR" command, to redefine or re-direct the Error Event of a form?

No, but you can control what happens in the Error method.

>Here's why: I'm trying to open a table in 'exclusive' mode inside an object and I don't want any error messages or anything like that if it fails.

Here's how you could do that in the Error method (this is just off the top of my head, so don't expect to copy and paste it and have it work <g>):
use MYTABLE
if not used('MYTABLE')
* error must have occurred, so do something here
endif

procedure Error && the Error method of the form
lparameters tnError, tcMethod, tnLine
do case
    case tnError = &&something that indicates a problem with the table
        return
* rest of cases go here
endcase
Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform