>I see a note in the Help that might be pertinent to your case. Way at the bottom, it says that "if no activeform... etc...generates an error" - otherwise it may actually work okay, and by design, at that, since the error is covered in Help. In this case, the FP Advisor note is incorrect, VARTYPE works as designed. Anyone else find any other situations where VARTYPE causes error? Should we use it or avoid it?
I searched VS6 MSDN help file for this "activeform" reference of which you speak and I haven't found it yet. Where
exactly is it?
I see at the bottom of the VFP filtered docs for vartype()...
Remarks
VARTYPE( ) is similar to the TYPE( ) function, but VARTYPE( ) is faster and does not require quotation marks to enclose the expression for which the data type is returned.
VARTYPE( ) returns “U” if you specify a variable that doesn’t exist."
I draw your attention to the last line.
BTW, I don't know what an activeform object would have to do with an undefined variable. Do you? But, the method in which I use the function can and is called from anywhere, including forms.
Have you attempted to reproduce this behavior?