Hi Terry
>It would help if we knew what data type THISFORM.ReplaceCodes(THIS.VALUE) is supposed to return.
I had step through the code I stepped through it again and the value in the variable was always a string. The boo-boo came at the end where I had completely forgotten to a RETURN statement. Sorry about the trouble.