How do i Make visual basic remember selections From other forms

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2006
Posts: 25
Reputation: Smooth_411_2000 is an unknown quantity at this point 
Solved Threads: 0
Smooth_411_2000 Smooth_411_2000 is offline Offline
Light Poster

How do i Make visual basic remember selections From other forms

 
0
  #1
Jun 8th, 2006
How would i make visual basick remember selections from other forms so it will excute the disired outcome at the end of my process.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do i Make visual basic remember selections From other forms

 
0
  #2
Jun 8th, 2006
You should be able just to reference those elements. Let's pretend you have form1, and form2. You have a button on form1, and a combobox on form2. In the code for the button on form1, you could do this
msgbox form2.combo1.text, and it will gladly display the information in form2's combobox, with a click of a button on form1. If you are talking about something more complex, you may need to delve into using files, or registry entry's as a means to save your data for use from another app or something like that.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 119
Reputation: agrothe is an unknown quantity at this point 
Solved Threads: 14
agrothe's Avatar
agrothe agrothe is offline Offline
Junior Poster

Re: How do i Make visual basic remember selections From other forms

 
0
  #3
Jun 9th, 2006
Originally Posted by Smooth_411_2000
How would i make visual basick remember selections from other forms so it will excute the disired outcome at the end of my process.
It also depends on what you mean by 'process'. If you trying to create a wizard type application, save the form selections in variables for easy reference at the end of the process. If your 'process' spans multiple application instances then, as comatose said, you'll need to use files or what not. And you could use a database, but thats a whole different discussion. . . .
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do i Make visual basic remember selections From other forms

 
0
  #4
Jun 9th, 2006
Plus a database would be a serious waste of database (and processing) power to handle a few values that need to be saved.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 2
Reputation: bulanhagui is an unknown quantity at this point 
Solved Threads: 0
bulanhagui bulanhagui is offline Offline
Newbie Poster

Re: How do i Make visual basic remember selections From other forms

 
0
  #5
Jun 21st, 2006
Originally Posted by Smooth_411_2000
How would i make visual basick remember selections from other forms so it will excute the disired outcome at the end of my process.
if you want to call a variable in another form, you can also set the variable as public.
EX. Public CustomerID
you can also use module if you have lots of forms. To reduce the coding and space you can call all the function in each form in an object.

I hope you find these useful. happy programming
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC