Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Value from one form to anther.
Message
 
 
À
04/03/2002 07:19:25
Hisham Serry
Al-Bahar United Company
Kuwait, Kuwait
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00615925
Message ID:
00627756
Vues:
25
>Hi Nadya
>
>well, I was trying the "do form formname to memvar" let me tell how I do it because I'm havving an error which says the valiable is not found.
>
>I do the following:
>
>1. in main form (A) I have a command bott. which is running form (B)
>in this command I write. do form acclist to myaccno
>Note do I have to make it public ??
>

No, you don't have to. You can declare local variable lcMyAccNo before
do form accList to lcMyAccNo
=messagebox(m.lcMyAccNo) && To check your variable

>2. the form (B) gets loaded and the form which window type is modal and have a grid, in the unload method I write return myaccno
>
Correct. Is myAccno defined in the Unload method? It could be Form's B property.

>3. in teh form (B) the grid has and method of double click to get the value of the text in the frid and put in the myaccno then it release the form.
>

myAccNo then should be a form's property, e.g. your grid should set thisform.myAccNo = MyTable.AccNo and in Unload method you should have
return thisform.myAccNo
>Note how my form (A) will have the value of myaccno in my combo box,
>the value of myaccno should be returned in my combo box or text box ?

You can do in the Command button:
 local lcMyAccNo
 do form FormB to lcMyAccNo
 if vartype(m.lcMyAccNo)='C' && Character, if it should be numeric , change to "N"
     thisform.textbox1.value = m.lcMyAccNo
 endif
>do I have to make something else in the form (A) ??
>Exp.: write public myaccno before issueing do form (B) to myaccno
>
>thanks.
>Hisham

No need to use public variables.

HTH
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform