>I Have A Stock Master File. When I Run A Form For Sale For A Particular Stock I Don't Want To Allow The User To Append A record in that Sale Transaction Table. I Have Used The Insert Trigger On Sales Table Which Checks Whether There Are Records Existing in the Stock Master. If There Are No records It Does Not Allow To Append The Record Through A Statement called "Return .F." In The Trigger.This Command Displays A VFP Message "Trigger Failed". How Do I Avoid This Message.Can I Use TableUpdate Or Tablerevert Or Rollback Commands And If Yes How?? My Tables Have Buffer Mode Override Property Set To 5.
>
>can AnyBody Help Me??
Jayesh,
If you are appending records with a command (like append blank), Visual FoxPro returns the "Trigger Failed" error message when no ON ERROR routine is active. If there is an OnError routine active, the onerror routine is executed instead.
So, what you need is an On Error routine...