solutionsdxb
Member
- Joined
- Mar 18, 2009
- Messages
- 8
- Programming Experience
- 1-3
Hi,
i am using vb.net 2005 to developed desktop application ,
I am having two windows form user control , the first control name con.vb containing the design and code for connecting to database and getting a list of my project values in combo box.
Now the second user control report.vb which i am using to generate some reports , since the code behind is using connection to connect to various project database , so i want to get the value of
First user control into another how i can get the i have tried the below but its giving me error in run time but no error in design or code behind -
MR.MainForm.Connection1.project_combobox.SelectedValue.ToString
Error i am getting is :
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="MDR"
i am using vb.net 2005 to developed desktop application ,
I am having two windows form user control , the first control name con.vb containing the design and code for connecting to database and getting a list of my project values in combo box.
Now the second user control report.vb which i am using to generate some reports , since the code behind is using connection to connect to various project database , so i want to get the value of
First user control into another how i can get the i have tried the below but its giving me error in run time but no error in design or code behind -
MR.MainForm.Connection1.project_combobox.SelectedValue.ToString
Error i am getting is :
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="MDR"