>Cetin,
>
>I have inserted a breakpoint just before the output function and cannot find anything wrong with the code. I cannot access the output code as it is protected.
>
>I was just thinking if the SubStr Function (I am only using it once in the code) is not giving the error then what is.
>
>thanks,
>
>Jason
IIRC, there is a situation where you'd get this error when SET TALK is ON, and you wouldn't get it when SET TALK is OFF.