>>Try VARTYPE(myvar) -- if it returns "O" it's an object, if it returns "X", it's NULL
>
>Sorry Guys,
>
>I meant to post this in the VB forum. Doh!
>
>BTW, type("MyObject.Name") = "C" is the best way in VFP. Vartype returns the type of the var, regardless of it's content. So if it was an object and was later set to .null. it still returns "O".
>
TYPE() behaves like this, VARTYPE() doesn't.
lox = CREATEOBJ("form")
? TYPE("lox") && "O"
lox = .NULL.
? TYPE("lox") && "O"
lox = CREATEOBJ("form")
? VARTYPE(lox) && "O"
lox = .NULL.
? VARTYPE(lox) && "X" - null
Insanity: Doing the same thing over and over and expecting different results.