>>Q1. Is my solution to the problem on the right track?
>
>I don't see what is the solution?
Actually it was the releasing of the local variable loO
>>Form.txtINo.LostFocus()
>>
DODEFAULT()
>>
>>LOCAL loO
>>
>>loO = THISFORM.oSetFocusPage
>>loO.SETFOCUS()
>>
>>*** this line I just added
>>RELEASE loO
Thanks for your help.
>Bhavbhuti,
>
>See my replies inline below
>
>>Hi Sergey
>>
>>It was my fault after all.
>>
>>Thanks for the ref. it is a fine utility, though it gave me a clean chit for references as the form always closes w/ w/o the error <g>
>>
>>Q1. Is my solution to the problem on the right track?
>
>I don't see what is the solution?
>
>>Just to clarify my doubts
>>Q2. Will THISFORM.oSetFocusPage be my responsibility to reset to .NULL. in form.destroy() ?
>>Q3. Or will the form release the THSIFORM.oSetFocusPage property?
>
>Yes, it's your responsibility to releasy any references to form objects stored in form properties. It's good idea to release any references stored in the properties. Check fox.wikis, when it comes back, for discussion on this topic.
>
>>
>>Though I was not using ADDOBJECT(), CREATEOBJECT(), but the following:
>>
>>Form.Refresh() -> Form.RefreshOnce() -> Form.EnableDisableControls()
>>
IF TYPE("THIS.pgf.Page14") # "U"
>> WITH THIS.pgf.Page14
>> IF "ANEMIA"$UPPER(v_LKtPatients.cTest) OR "WIDAL"$UPPER(v_LKtPatients.cTest) ;
>> OR "FULL"$UPPER(v_LKtPatients.cTest)
>> .ENABLED = .T.
>> THISFORM.oSetFocusPage = THIS.pgf.Page14
>> ELSE
>> .ENABLED = .F.
>> ENDIF
>>...
>> ENDWITH
>>ENDIF
>>
>>
>>
>>Form.txtINo.LostFocus()
>>
DODEFAULT()
>>
>>LOCAL loO
>>
>>loO = THISFORM.oSetFocusPage
>>loO.SETFOCUS()
>>
>>*** this line I just added
>>RELEASE loO
>>
>>I didn't call RELASE loO, I was relying on the assumption that the local variable will be released when it goes out of focus.