jfgrayiii
asked on
Form view question
If I use a form view component how do I referance that field in vb
example formview1 has a field called "name" when I try to referance this field in the vb source. it tell me that name is not declared
example formview1 has a field called "name" when I try to referance this field in the vb source. it tell me that name is not declared
ASKER
If I have a textbox out of a form view I can type
me.textbox1.text = "blah blah"
If that text box is used in a form view or data grid
me.textbox1 will say not declared
me.textbox1.text = "blah blah"
If that text box is used in a form view or data grid
me.textbox1 will say not declared
me.parent.textbox1.text = "blah blah"
You have to refer to the parent of your control (the form), and then access it's controls.
Jake
You have to refer to the parent of your control (the form), and then access it's controls.
Jake
ASKER
how would I referance a field from
sqldatasource1
in
formview1 ?
sqldatasource1
in
formview1 ?
You can set it when you create the FormView1...
For Instance, you could say (in FormView1):
Private SqlDataSource1 As SqlDataSource
Sub New(ByRef SqlDataSource1 As SqlDataSource)
Me.SqlDataSource1 = SqlDataSource1
End Sub
Now you can access SqlDataSource1 from your FormView1.
Hope that helps,
Jake
For Instance, you could say (in FormView1):
Private SqlDataSource1 As SqlDataSource
Sub New(ByRef SqlDataSource1 As SqlDataSource)
Me.SqlDataSource1 = SqlDataSource1
End Sub
Now you can access SqlDataSource1 from your FormView1.
Hope that helps,
Jake
ASKER
If I drop a text box on a form I can double click on that box and write vb code
example.
me.textbox1.text = "0"
If I insert a form view component right click on it, go to edit templete, and add a textbox and double click on it
me.textbox1.text does not work it says textbox 1 not declared how do I declare a referance to textbox1 in a form view
example.
me.textbox1.text = "0"
If I insert a form view component right click on it, go to edit templete, and add a textbox and double click on it
me.textbox1.text does not work it says textbox 1 not declared how do I declare a referance to textbox1 in a form view
ASKER
I am using visual studio 2005 btw
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Jake