>To add a little to Craig's answer, if you pass the calling form as an object
>
>obb = CREATEOBJECT("Myclassfrm",thisform,"Para2")
>
>the 'thisform' object can be used to update any property on the calling form.
>
>Make a property on the new form to hold the value.
>
>If the property is "oCallingForm", then
>
>thisform.oCallingForm.ValueINeed = thisform.ValueIWantToReturn
>
>HTH
>Barbara
>
>>I have a form that needs to return a value to the calling program. I have made it into a class and wish to activate it with CREATEOBJECT().
>>
>>I know how to return a value from a form:
>> DO form MyForm With Para1,Para2 to return_value
>>
>>But how can I do this if the form is saved as a class??
>>
>>obb = CREATEOBJECT("Myclassfrm","Para1","Para2") but how to return a value??
Barbara-
In your response (which I understand to a point), you said to make a property on the new form to hold the value -- would the property be "ValueIWantToReturn"?
If so, that would make "ValueINeed" a property on the calling form.
To refer to the property on the calling form from the "called" form, you would then need the indirection "thisform.oCallingForm.ValueINeed".
But where and how does the "oCallingForm" property get created?
This had me confused from day one of these kinds of discussions and I finally worked up the guts to say I don't get it!
--Steve.
Steven Herbin
SNH Computing Corporation
Swan Lake, NY