oParamObj = createobject('Empty') if type('thisform.osearchform.name') = 'C' && form is still active thisform.osearchform.Show() if pemstatus(oParamobj, 'SelectedCustomer',5) &&<= return .f. why ? thisform.txtCusno.Value = oParamObj.SelectedCustomer endif ELSE DO FORM client_srh1 NAME thisform.osearchform WITH oParamObj, gUserno if pemstatus(oParamobj, 'SelectedCustomer',5) thisform.txtCusno.Value = oParamObj.SelectedCustomer endif ENDIFHere are the code of the Click event of a OK button.
addproperty(thisform.oParam, 'SelectedCustomer', cusmas_srh->cusno) thisform.hide()If I remark the statement: if pemstatus(oParamobj, 'SelectedCustomer',5)...endif and run again,
oParamObj = createobject('Empty') if type('thisform.osearchform.name') = 'C' && form is still active thisform.osearchform.Show() *!* if pemstatus(oParamobj, 'SelectedCustomer',5) thisform.txtCusno.Value = oParamObj.SelectedCustomer *!* endif ELSE DO FORM client_srh1 NAME thisform.osearchform WITH oParamObj, gUserno if pemstatus(oParamobj, 'SelectedCustomer',5) thisform.txtCusno.Value = oParamObj.SelectedCustomer endif ENDIFPlease advise.