well, I bet that instead of writing it to term, the term never gets changed at all.

so, simply add after:
Set "term="+$

this:
"the Term should be: $
?
get $


with this you can debug what the outcome really is.
_________________________
!

download KiXnet