File: SAMPLES\SOLUTION\FORMS\PARAM.SCX
This solution illustrates passing parameters to a form and returning a value back.
This form has the user enter a question and possible responses. Then, in the Click event of the cmdAsk button, the ParamAsk form is opened by passing the Question and Possible responses.
cParam1 = THISFORM.txtPassValue1.value nParam2 = THISFORM.opgPassValue2.value DO FORM LOCFILE("ParamAsk.scx") WITH cParam1, nParam2 TO nRetValue
The PARAMETERS are passed to the Init of the form where they are processed.
PARAMETERS cQuestion, nButtons THISFORM.txtQuestion.caption = cQuestion
In the Unload event of the form, the value stored in retvalue is returned back to the calling form:
RETURN THISFORM.retValue