General information
Category:
Coding, syntax & commands
>>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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only