It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

How to set value on the calling form

Moderator: dafunkymunky

How to set value on the calling form

Postby qscott86 on Thu Dec 31, 2009 2:58 am

Okay so I'm kind of a beginner, but basically I have a form with a textbox that when double clicked opens another form (a zip code lookup). When the user chooses a zip code and double clicks it, I need it to take that value (which I already have captured into a variable) and set the value of a textbox on the calling form (the form that used formname.show) to that value. How do I pass that value back to the calling form? I don't want to use an absolute reference as I obviously want to use this popup form to set values on other forms that may call it.


Thanks in advance.
qscott86
 
Posts: 1
Joined: Thu Dec 31, 2009 2:52 am

Re: How to set value on the calling form

Postby Tanzim on Thu Dec 31, 2009 9:23 am

Best to create a module to keep your variables, and instead of using 'Dim var as Integer/String'

do

'Public var as Integer/String'

This way you can use it in all forms.
Tanzim
 
Posts: 11
Joined: Sun Dec 27, 2009 11:22 am


Who is online

Users browsing this forum: No registered users and 10 guests