Passing variables between classes

cpopham

Member
Joined
Jun 3, 2004
Messages
20
Programming Experience
1-3
I am creating a two tier application for database connectivity. I have all of my connections, dataadapters, etc in a single class named ReqTrakData (ReqTrakData.vb)

On a form a user makes a selection from a combo box. I save this selection to a Public variable (mstrSelectedNum) which has been declared at the beginning of the form.

Now I want to able to use this variable in a function in my ReqTrakData class. How can I use this vairable in my ReqTrakData class?

Chester
 
cpopham said:
I am creating a two tier application for database connectivity. I have all of my connections, dataadapters, etc in a single class named ReqTrakData (ReqTrakData.vb)

On a form a user makes a selection from a combo box. I save this selection to a Public variable (mstrSelectedNum) which has been declared at the beginning of the form.

Now I want to able to use this variable in a function in my ReqTrakData class. How can I use this vairable in my ReqTrakData class?

Chester
In your ReqTrakData class
VB.NET:
 dim x as nameofform
 x.mstrselectednum = "your code"

hope it helps...
if not sorry
 
Back
Top