?
Solved

Options for passing values between forms...

Posted on 2003-03-27
6
Medium Priority
?
137 Views
Last Modified: 2010-05-01
I'm a VB Noob and have just started my first program with VB.  What are the options available for passing a value from one form to another?  Also, if anyone can direct me to a good reference and/or tutorial site, I can probably answer alot of my own questions there.  

Thanks!
0
Comment
Question by:jeremycase
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:aelatik
ID: 8219859
For example

Form2 you have :

Public MyString as string

you can access the value from form1 by typing

msgbox form2.MyString

ps. For tutorials type 'Visual Basic Tutorials' in www.google.com ( It will give many results )
0
 
LVL 2

Accepted Solution

by:
Jacamar earned 60 total points
ID: 8220276
Add a new module to your program.  In that module, do

Public stString as String

You can now use stString in any forms in that project.
0
 

Author Comment

by:jeremycase
ID: 8220333
Thanks!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Jacamar
ID: 8220376
Funny that it was a B grade............did it do what you wanted?
0
 

Author Comment

by:jeremycase
ID: 8225366
yes it did...I'm sorry...Was my first time...forgive the virgin?
0
 
LVL 2

Expert Comment

by:Jacamar
ID: 8225819
yeah.....I forgive.....it's just that usually if the code does what you were after then and A grade would be assigned.  If the code led you towards getting the answer (like if the code wasn't perfect but it aided you towards the answer) then usually a B, and if the code wasn't very good at all, but it did contain something that opened you up to trying something else that led you to the answer, then a C would be good.

No worries though.  
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question