Thanks, but I know how to write an error handler. I really was just trying to find out if there was a way to retrieve the message with just the number.
Michelle
>In my error method of my form class, I have this:
>
>
>LPARAMETERS nError, cMethod, nLine
>cMsg = 'Error number: ' + STR(ERROR( )) + chr(13)
>cMsg = cMsg + 'Error message: ' + MESSAGE( ) + chr(13)
>cMsg = cMsg + "The error occurred in : " + cMethod + chr(13)
>cMsg = cMsg + "Line # : " + str(nLine) + chr(13)
>thisform.prtmsg(cMsg)
>
>
>you could assign those globals in here.
>
>Won't help if you are not dealing with a form, I guess. but your could do a little PROC and call it like this
>
>ON ERROR do myErrorProc with ERROR(),MESSAGE()
>
>
>Where your little proc does whatever you like with those 2 things