Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the return parameter from a MDI form ?
Message
 
 
To
27/07/2011 02:31:12
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01519135
Message ID:
01519319
Views:
32
>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' && form is still active
>   thisform.osearchform.Show()
>   if pemstatus(oParamobj, 'SelectedCustomer',5)   &&<= the pemstatus() return .f.  Why?
>        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
Previous
Reply
Map
View

Click here to load this message in the networking platform