Well it wasn't quite it, but it made me look closer, the return value was stored in loRS.Fields(0).Value, once I observed the value of lnRV thanks to your suggestion I figured this out. Seems like trying to read the value from a non existant Field object created the problem. It also made me realize that my error handler was "eating" the generated error, thanks a lot.
>Try to convert field's value to some VFP internal data type, in your case to number, to avoid any references.
>
lnRV = Int( loRS.Fields(1).Value)
>or something like that.