Dim dv As New DataView(Me.mydatabaseDataSet.Table1)
dv.RowFilter = "Column1 > Val(TextBox1.Text)"
DataGridView1.DataSource = dv I'm going to assume that the reason for your problem is your basically asking for column1 to be greater than Val(TextBox1.Text) and that TextBox1.Text is not a number. Now wait. Let me explain what I mean. That line is taken as a literal string Column1 > Val(TextBox1.Text) exactly that. What I think you're wanting to do is concatenate what is in TextBox1's .Text property to the RowFilter as such dv.RowFilter = "Column1 > Val(" & TextBox1.Text & ")" So in this example let's say that you entered 55 in textbox1 this would result in dv.RowFilter = "Column1 > Val("55")" and should no longer produce an error.
|