Ria,
Add two more parameters to your error handler: PROGRAM() and LINENO(). They will tell you in what program/line error happened.
>Hi,
>
>I am using a on error statement in my program as:
>On error do errtrap with error(),message(),message(1)
>
>Today the users got the message "Table has no index order set"
>and the Error code was "Select StudentTbl'
>
>But the code that causes this error message is not using/opening the StudentTbl. My error handler makes sure that if a third parameter is not passed, it assigns an empty string to it.
>
>Then why would my program display this line of code?
>
>Thank you.
>
>Ria
--sb--