I found a strange fix that makes no sense whatsoever. I have the variables DIM'd like this at the start of the FN: CLEAR LOCAL DIM endBar,endFlag,64 p$,tint If I set the value of tint, then the IF structure recognizes that endBar is non-zero and works correctly. If I leave tint as 0, then the IF structure will not recognize that endBar is >0, as described in the previous post. It's fixed for now, but I'm not happy with this at all. Any help would still be appreciated. ____________ Mark Goodes (Toronto, Canada) Much better at "OOPS!" programming than OOP programming.