Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return value from called form problem
Message
From
27/07/2011 03:57:12
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Return value from called form problem
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01519290
Message ID:
01519290
Views:
66
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
Next
Reply
Map
View

Click here to load this message in the networking platform