Specifies a valid expression or Visual FoxPro command to execute when an error occurs in code at run time.

ON ERROR [Command]



Specifies a valid Visual FoxPro command or expression to execute. Typically, ON ERROR uses the DO command to specify an error-handling procedure or program. For more information, see DO Command.

To restore the Visual FoxPro system error handler, use ON ERROR without an argument.

Expand imageRemarks

Expand imageExample

Expand imageSee Also