>How about:
>
>THIS.oForm.Release() && releases the form 'cls_timerform'
>THIS.oForm = .NULL && clears the object reference to the form
>
>HTH,
>Evan Pauley
>
>>Works great as property, but now how do I release this.oform from another form.
>>
>>For example I have a FormA and a FormB
>>
>>&&FormA.init
>>this.oform = createobject('cls_timerform')
>>thisform.FormA.visible = .f. && I am hiding this form
>>
>>
>>I want know how I can access oform properties from FormB?
>>
>>Thanks
>>Nick Patel
Simple. Pass a reference to your FormA to FormB. I guess you're starting FormB from FormA. So in preparation for this, have a property on FormB call it oCallingForm. In FormB's Init method, accept a parameter and store the calling objects reference.
FormB Init:
LPARAMETER toCallingForm
this.oCallingForm = toCallingForm && save the calling forms object reference.
FormB Destroy:
this.oCallingForm = .NULL. && Gid rid of the reference or you will not be able close FormB!
Now, in FormA where you need to call FormB, do:
DO FORM FormA WITH this
From anywhere in FormB's method code that needs to reference FormA, you would do it like:
this.oCallingForm.PropertyOfFormA = somevalue
or
LocalVariable = this.oCallingForm.ProprertyOfFormA
You could also use "thisform" instead of "this"
Hope that helps!