Ok so my import code is
I have the WithEvents thing at the topCode:Dim dt As New DataTable Using cn As New OleDb.OleDbConnection With {.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\ExcelWork.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES"""} Using cmd As New OleDb.OleDbCommand With {.Connection = cn} cmd.CommandText = "SELECT * FROM [Sheet1$]" cn.Open() dt.Load(cmd.ExecuteReader) End Using End Using bsData.DataSource = dt DataGridView1.DataSource = bsData
My filtering statement is (It's in a textchanged Sub)Code:Public Class Form1 WithEvents bsData As New BindingSource
To filter the PartNumber Column for the text in txtSearchCode:bsData.Filter = "PartNumber = '" & txtSearch.Text & "'"
When I filter the filter only works if I type the EXACT text (which is a long part number) in the text box. Shouldn't it just reduce the results so I don't have to type the whole thing


Reply With Quote


