Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing values to another form.
Message
De
22/07/1998 09:26:10
Brad Stickley
Parker Pneumatic Div. North America
Wake Forest, Caroline du Nord, États-Unis
 
 
À
22/07/1998 03:47:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00119709
Message ID:
00120124
Vues:
20
Gentlemen,

The problem has been solved! The code on each form was correct as far as for a normal application. However, the OLE object had to have some special parameters set up in the mousedown event and they had been erased. I restored them and it works wonderfully!

Many thanks to all of the great help you guys have been on this!!!

Brad.




>>>>>>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.
>>>I think Mark is not here so I can answer. Yes Brad cString would be assigned the value you passed. But beware that parameter(s) are scoped to init method. You either save it in a form property or use just in init. ie: if you use it in something like :
>>>
set filter to myField = cString
You would face an error message. Instead use "name" clause of form I suggest.
>>>
do form myCaller name ("myForm") linked
>>>*From within myCaller any method
>>>DO FORM c:\b3\magnify.scx
>>>* Now magnify.scx could access myCaller's text1.value via myForm
>>>* or any PEM of myCaller
>>>* Magnify.scx any method, event
>>>if myForm.text1.value = ...
>>>....
>>>* Or change a prop in myCaller
>>>myForm.text1.backcolor = rgb(255,255,128)
>>>*Or refresh myCaller
>>>myForm.refresh
Cetin
>>
>>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
>Brad,
>Possibilities I can think :
>-lparameters (or parameters) is not the first line in init.
>-Windowtype property is 2 or 3 (only FP 2.x converted could be) so parameter is passed to load event not init.
>
>But in all I still insist using "name" clause in "do form" is better. You'll realize it's, when you try to return value(s) from a form or need to access another form.
>Cetin
He is there and He is not Silent.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform