Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning a value from a VB Form 1

Status
Not open for further replies.

lpedde

Programmer
May 16, 2001
10
US
This is probably very basic but I am having to teach myself VB after a background in Paradox for DOS. :)

I have a VB form which allows the user to request labels for a given zip code range. From this form I call another form which prompts the user to put labels in the printer before building and printing the labels. I need to know how to have Form2 return to Form1 either True or False based on the button pushed on Form2 ("Print Labels" or "Cancel Labels").
I am confused about the scope of variables. I don't really want to declare a global variable for the whole project just for these two modules.

Thanks Linda
 
On approach you can try is to set up a hidden text box on form1.

Then on form2 add at the appropriate point in the logic

form1.edhiddencontrol.text = "T"
or
form1.edhiddencontrol.text = "F"

then you can easily reference the control value from form1

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top