FindValue does not return nil when no record found

Joakim Schramm joakim at astrocalc.com
Wed May 10 17:44:37 CDT 2006


The code

Set objVset = f1.FindValue(lngVar)

If no record is found give result

objVset Is Nothing

Well it actually leave it as Nothing

The code

Set objVset = f1.FindValue(lngVar, objVset2)

If no record is found give result

objVset Not Is Nothing

I guess it, technically speaking, returns an empty set, initialing the
object to not be nil.

This is inconsistent and makes it impossible to test the state of the object
in a proper way. It should in my opinion return nil (Nothing in VB).

I think the same thing is true with FindValueAsArraySet()

Joakim



More information about the Valentina mailing list