>Trey,
>This raises the question Why. Forms and toolbars, for that matter, have a Parent property. All VFP baseclasses have it (even session). Vartype is not supposed to throw an error unless Forms[x] doesn't exist (in which case Parent could not be evaluated).
>
>Curiouser and curiouser!
>
>>>Thanks Larry
>>>
Any object not inside a container will error out on
Vartype(object.Parent)
.
Try this:
ox = CreateObject("textbox")
? Vartype(ox.Parent)
If the form is not part of a formset (e.g., not in the designer) it will fail.
Parent seems to be removed or deallocated if the object is not inside a container. It still shows up in an AMembers() array or the object tree in the Watch window - but in the Watch window it cannot be evaluated.
Insanity: Doing the same thing over and over and expecting different results.