Hi,
I just have a quick databinding question. I have 2 forms......
Form1 is my main form containing all the controls i want to bind the results of my query to.
Form2 contains a datagrid containing a list of guests in the database. The user can click on a row to select a guest. They then hit the OK button. This will then run a query to retrieve that guests details from my database. What i now want to do is bind the results of the query from Form2 to the controls on Form1.
Does anyone know how to do this??
I know how to bind to controls on the same form but not when they are on a differnt form!!!
This is what i normally use....
Me.txtFName.DataBindings.Add(New Binding("Text", ds.Tables
("Guest"), "F_Name"))
in VB6 i would just replace 'Me' with the name of the other form, but this does not seem to work in VB.NET!!!!
i.e
Form1.txtFName.DataBindings.Add(New Binding("Text",
ds.Tables("Guest"), "F_Name"))
when i try the above i get the following error:
Reference to a non shared member requires an onject
refernce
Can anyone please help me?
Many thx
I just have a quick databinding question. I have 2 forms......
Form1 is my main form containing all the controls i want to bind the results of my query to.
Form2 contains a datagrid containing a list of guests in the database. The user can click on a row to select a guest. They then hit the OK button. This will then run a query to retrieve that guests details from my database. What i now want to do is bind the results of the query from Form2 to the controls on Form1.
Does anyone know how to do this??
I know how to bind to controls on the same form but not when they are on a differnt form!!!
This is what i normally use....
Me.txtFName.DataBindings.Add(New Binding("Text", ds.Tables
("Guest"), "F_Name"))
in VB6 i would just replace 'Me' with the name of the other form, but this does not seem to work in VB.NET!!!!
i.e
Form1.txtFName.DataBindings.Add(New Binding("Text",
ds.Tables("Guest"), "F_Name"))
when i try the above i get the following error:
Reference to a non shared member requires an onject
refernce
Can anyone please help me?
Many thx