Can anyone tell me why this filter does not work.
1) ProgramID field in the Bid table is a FK col. to a table called IDPrograms.
2) IDPrograms tables PK col is ProgramID but is not a autonum or a num field at all (I don't know why) I did not create this db. It is a text field
Here's my code, but I get the error: cannot find column "ProgramName". ProgramName is replace with the cmbPrograms.selectedvalue
This exact code works with integers like selected indexs, or where the damn ID field is actually a integer.
Maybe you need more info but can anyone help me.
1) ProgramID field in the Bid table is a FK col. to a table called IDPrograms.
2) IDPrograms tables PK col is ProgramID but is not a autonum or a num field at all (I don't know why) I did not create this db. It is a text field
Here's my code, but I get the error: cannot find column "ProgramName". ProgramName is replace with the cmbPrograms.selectedvalue
Code:
Private Sub cmbProgram_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles cmbProgram.SelectedIndexChanged
Dim ProgramName As String
ProgramName = cmbProgram.SelectedValue
BidBindingSource.Filter = String.Format("ProgramID =" & ProgramName & " AND Archived = False")
End Sub
Maybe you need more info but can anyone help me.