Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return value from called form problem
Message
De
27/07/2011 03:57:12
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Return value from called form problem
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01519290
Message ID:
01519290
Vues:
67
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 search form, if not, DO FORM client_srh...
First time run is ok, no problem, but second time after the form hide,
the statement premstatus() after thisform.osearchform.Show(), return .f.
so that cannot assgin the return value to thisform.txtCusno.Value, why ?
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
ENDIF 	
Here 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,
it have error message for the Property SelectedCustomer is not found. Why ?
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
ENDIF 	
Please advise.
Derek
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform