Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing values to another form.
Message
De
21/07/1998 16:14:49
Brad Stickley
Parker Pneumatic Div. North America
Wake Forest, Caroline du Nord, États-Unis
 
 
À
21/07/1998 16:01:47
Brad Stickley
Parker Pneumatic Div. North America
Wake Forest, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00119709
Message ID:
00119858
Vues:
15
>>>>>I have form that has a text box bound to a table. I need to pass the value in the text box to another form. How do I do that and what would the code look like?
>>>>>
>>>>>Thanks, Brad.
>>>>
>>>>If you are creating the new form, then it's not such a problem
>>>>
>>>>Use
>>>>
>>>>DO FORM formname WITH THISFORM.Textbox.Value
>>>>or
>>>>loForm = CreateObject( "formclass", THISFORM.Textbox.Value)
>>>>
>>>>and then pick up the passed value by using a PARAMETERS statement in the Init of the Form.
>>>
>>>Mark,
>>>
>>>Thanks for responding to my question. What should the init code on the form look like with the parameters?
>>>
>>>I am using on the main form DO FORM c:\b3\magnify.scx with thisform.text1.value
>>>
>>>I put LPARAMETER cString in the init of the second form. Does it automatically asign the passed variable to the parameter?
>>>
>>>Thanks again,
>>>Brad.
>>
>>Yes, the value should be inside cString when the Init code runs.
>
>
>Thank you very much for answering my quesions.
>
>I am getting an error "NO Parameter Statement is found" however, I have put Lparameter cText1 in the init of the new form. Any suggestions?
>
>Thanks in advance,
>Brad

This is what I have in the event on the main form.

*!* Get the values to pass
cParam1 = THISFORM.Text1.value
*!* Call the form with the passed parameters

DO FORM LOCFILE("magnify.scx") WITH cParam1

This is what I have on the init of magnify.scx

LPARAMETERS cParam1

Then I call up in the activate

Thisform.text1.value = cParam1 &&This assigns the value passed to the text box.

But I still am getting an error that the parameters statement was not there.
I am not sure what I am doing wrong and would greatly appreciate any advice.

Thanks, Brad
He is there and He is not Silent.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform