>Hi,
>
>Here are the code in a Search Command Button click event.
>I check the search form is active or not, if active show out the form, if not, DO FORM client_srh...
>but after the statement thisform.osearchform.Show() the premstatus() return .f.
>so that cannot assgin the return value to thisform.txtCusno.Value, why ?
>
>
>oParamObj = createobject('Empty')
>if type('thisform.osearchform.name') = 'C'
> thisform.osearchform.Show()
> if pemstatus(oParamobj, 'SelectedCustomer',5)
> thisform.txtCusno.Value = oParamObj.SelectedCustomer
> endif
>ELSE
> DO FORM client_srh NAME thisform.osearchform WITH oParamObj, gUserno
> if pemstatus(oParamobj, 'SelectedCustomer',5)
> thisform.txtCusno.Value = oParamObj.SelectedCustomer
> endif
>ENDIF
>
>
>In the Click event of the OK button in Search Form
>
>
>thisform.oParam.SelectedCustomer = cusmas_srh->cusno
>thisform.hide()
>
>
>Please advise,
>Derek
Because you created this ParamObject right before you made your call.
Create this object in the Init of the caller's form, something like
thisform.oParamObject = createobject('Empty')
and pass thisform.oParamObject
This way it will keep the info.
If it's not broken, fix it until it is.
My Blog