>If I wrote
>
>on error 1881 = messagebox ("bad data")
this one is a logical expression so it compare 1881 with the result of messagebox.. it will result always .f.
>
>it works OK, but if I wrote
>
>on error 1881 do form error1
>
>It gives sintax error
>
>What can be wrong ?
try:
m.tipe_err = 1 && serious one
m.tipe_err = 2 && not so serious
m.tipe_err = 3 && just warning
On ERROR DO errorhandler WITH MESSAGE(), ERROR(), LINENO(), m.tipe_err, PROGRAM()
Function errorhandler
Parameters m.messg, m.error_no, m.lineno, m.code, m.programid
#if version(2)=2
SET STEP ON
#endif
If m.error_no = 1881
do form error1
Return
Endif
HTH
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20