Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning values
Message
 
À
25/08/1996 18:45:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00006630
Message ID:
00006658
Vues:
44
>>>
>>Run your form with:
>>Do YourForm to YourResult
>>where Your Result is a variable where you receive the result from YourForm
>>
>>In the Unload method issue only:
>>return nEmplID
>
>
>I made the above mentioned changes and elimiated all
>the syntax errors but the value of the selected record
>is not retuened from the form.

This might be because by the time the Unload method is called, the
nEmplID field has already 'expired' (ie, the data source has
already been unloaded).

>While searching for alternatives, i placed code in the dbl
>click event of the list box to store the ID to a newly created
>public variable and then release the form.
>
>THAT returns the correct value so I know the list box is
>functioning but creating public variables on the fly
>seems an incorrect way to go about sending values back and
>forth...

Don't use a public variable (non-OO, IMHO messy). Create a protected property for your form. Store the ID to that property on the list box's
double-click event, and return that ID in your Unload method.

This works. I do it all the time.

Regards to all,
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform