Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a form
Message
From
06/12/2000 12:15:13
 
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00449724
Message ID:
00450006
Views:
31
>>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
Map
View

Click here to load this message in the networking platform