View Single Post
  #1 (permalink)  
Old January 17th, 2005, 07:53 AM
madhukp madhukp is offline
Friend of Wrox
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default passing a variable from one form to another

May I know what is the best way to pass one variable from one form to another in VB 6.0 ?

For e.g., I have a form which lists all employees after a search. On clicking an employee, I should show the full details of the employee, for which I need to pass the id of employee to the second form.

Currently, I am setting a global variable (in a module) and accessing it from the above 2 forms - once for setting it and once for using it. But this does not seem to be a professional method and not scalable also. When number of values to be passed increases I will have hundreds of public variables in module.

Is there any other way ? Something like querystring in web environment ?


Reply With Quote