I am filtering a datagrid by way of textboxes (7 total).
They all work except for two, the first contains birthdates of which I receive the subject line error "Cannot perform 'Like' Operation on System.Datetime and System.String".

Here is the code I am using:

Const MessageBox_Title As String = "Filter"


' Fill data before attempting to filter

Debug.Assert(Not DsStudentInfo1.Tables(tblStudentInfo) Is Nothing, _
"No product data loaded in dsStudentInfo1.Tables(tblStudentInfo)")

With DsStudentInfo1.Tables(tblStudentInfo)
' Filter view
.DefaultView.RowFilter = "StudentBirthdate = '" & txtFilterBirthdate.Text & "%'"

' Matching data

If .DefaultView.Count = 0 Then
MessageBox.Show("No matching rows.", _
MessageBox_Title, _
MessageBoxButtons.OK, _
MessageBoxIcon.Information)
End If

' Bind datagrid to dataView, display matching rows.
DataGrid1.DataSource = .DefaultView
End With


The second is a textbox that Filters a 3integer code and will only allow me to fill one number at a time in the txtfilter box. I type one number, it displays "No matching rows". Put in the 2nd number, same thing, put in the 3rd number and the filter works and displays the matching criteria.

Here is the code:

Const MessageBox_Title As String = "Filter"

' Fill data before attempting to filter

Debug.Assert(Not DsStudentInfo1.Tables(tblStudentInfo) Is Nothing, _
"No product data loaded in dsStudentInfo1.Tables(tblStudentInfo)")

With DsStudentInfo1.Tables(tblStudentInfo)
' Filter view
.DefaultView.RowFilter = "StudentGradeLevelID = '" & txtFilterGrade.Text & "%'"

' Matching data
If .DefaultView.Count = 0 Then
MessageBox.Show("No matching rows.", _
MessageBox_Title, _
MessageBoxButtons.OK, _
MessageBoxIcon.Information)
End If

' Bind datagrid to dataView, display matching rows.
DataGrid1.DataSource = .DefaultView
End With

Any help would be greatly appreciated.

New to VB.net and learning through persistence and the generous help from all of you.