Information générale
Catégorie:
Codage, syntaxe et commandes
>>Can you return a value from a form? What does the syntax look like from the calling form, if you can?
>>
>>TIA
>
>No you can't do that directly. There are a couples of workaround to that.
>
>1. You assign return value to a public variable of the parent form.
>2. You call a function in the child form and this child shows the form modally. Then the function can return a value.
>3. You put the value in a public variable in the child form, just hide the child form, retreive the public variable from the parent form and the unload the child.
I ended up making the calling form a public variable. I needed to store the return value in a text box of the calling form. The called form is basically a selec printer modal dialog. When I'm done if that hit Ok and they've selected a printer from the list I store it directly to the calling form's text box.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement