>I have a .vcx file that has an object in it that calls the following command:
>
>THIS.AddObject("oSrchForm", "SearchOptions")
>--SearchOptions is a form class.
>
>My problem is that when I try to run the thing in VFP6 I get an error saying 'Object class is invalid for this container'.
>
>I'm creating other objects right before this one, but this is the first one that's based on a form class. Can I still do this in VFP6, or am I missing something? Thanks...
Victor,
A form may be added to formset, it may not be added to any other baseclass.
In your code you failed to tell us what base class THIS refers to, since many different base classes have the addobject method we cannot tell if there is a problem or if you are trying to add a form to something that cannot contain a form.