G
Guest
Hello
I'm trying to run the code below, but I'm running into a problem
It is populating a listbox, based on whether or not the user enters data into a text box. If they enter something, it returns only that record, if they leave it blank, it returns all records. This works fine.
Now I have text boxes that are linked to what is displayed in the listbox. If the user enters nothing, it works fine, and if the user enters something it works fine, but if the user enters one, then the other (without restarting the program) they receive the error message: "This would cause two bindings in the collection to bind to the same property"
How can I fix this?
Thanks
ambe
Private Sub butRetrieve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butRetrieve.Clic
lBoxCP.DataSource = Nothin
If txtCPMain.Text <> "" The
OleDbDataAdapter2.SelectCommand.Parameters("STR_CUTTING_PERMIT").Value = txtCPMain.Tex
DsCuttingPermit21.Clear(
OleDbDataAdapter2.Fill(DsCuttingPermit21
lBoxCP.DataSource = DsCuttingPermit2
lBoxCP.DisplayMember = "TDT_CUTTING_PERMIT.STR_CUTTING_PERMIT
Me.txtOArea.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DsCuttingPermit21, "TDT_CUTTING_PERMIT.STR_OPERATING_AREA")
Els
DsCuttingPermit1.Clear(
OleDbDataAdapter1.Fill(DsCuttingPermit1
lBoxCP.DataSource = DsCuttingPermit
lBoxCP.DisplayMember = "TDT_CUTTING_PERMIT.STR_CUTTING_PERMIT
Me.txtOArea.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DsCuttingPermit1, "TDT_CUTTING_PERMIT.STR_OPERATING_AREA")
End I
End Sub
I'm trying to run the code below, but I'm running into a problem
It is populating a listbox, based on whether or not the user enters data into a text box. If they enter something, it returns only that record, if they leave it blank, it returns all records. This works fine.
Now I have text boxes that are linked to what is displayed in the listbox. If the user enters nothing, it works fine, and if the user enters something it works fine, but if the user enters one, then the other (without restarting the program) they receive the error message: "This would cause two bindings in the collection to bind to the same property"
How can I fix this?
Thanks
ambe
Private Sub butRetrieve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butRetrieve.Clic
lBoxCP.DataSource = Nothin
If txtCPMain.Text <> "" The
OleDbDataAdapter2.SelectCommand.Parameters("STR_CUTTING_PERMIT").Value = txtCPMain.Tex
DsCuttingPermit21.Clear(
OleDbDataAdapter2.Fill(DsCuttingPermit21
lBoxCP.DataSource = DsCuttingPermit2
lBoxCP.DisplayMember = "TDT_CUTTING_PERMIT.STR_CUTTING_PERMIT
Me.txtOArea.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DsCuttingPermit21, "TDT_CUTTING_PERMIT.STR_OPERATING_AREA")
Els
DsCuttingPermit1.Clear(
OleDbDataAdapter1.Fill(DsCuttingPermit1
lBoxCP.DataSource = DsCuttingPermit
lBoxCP.DisplayMember = "TDT_CUTTING_PERMIT.STR_CUTTING_PERMIT
Me.txtOArea.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DsCuttingPermit1, "TDT_CUTTING_PERMIT.STR_OPERATING_AREA")
End I
End Sub