Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to refer the control in the calling form or parent f
Message
 
À
05/09/2013 02:39:52
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01582256
Message ID:
01582282
Vues:
47
>Hi,
>I have a form to call another form, let say Form A calling Form B,
>I want to assign the textbox control value in Form B which is value of the textbox control from Form A.
>
>For example:
>Form A -> thisform.txtclientcode.value = "ABC"
>
>Form B -> thisform.txtclientcode.value = Form A.txtclientcode.value
>
>I need to passing about 20 values from Form A to Form B, using Array or other method ?
>Which is better method ?
>
>Please advise.
>Thanks.
>Derek Yim


Easy way to do this is to simply pass the form object as a parameter to the 2nd form. Using that object then makes everything in the 1st form available in the 2nd form.

Running form 2 from form 1
Do form form2 with Thisform
Form 2 Init
 lParameters oForm1
Thisform.AddProperty('oForm1', oForm1)
Then anytime you need anything from form1 in form2
Myvar = Thisform.oForm1.txtName.Value
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform