i have used a textbox in the key up event this is wat i did :
i have also used add modules where i stored my codes for functions that i would use through out this project
Dim SQLString As String
Dim dtdbEmp As New DataTable
Dim DataAdapter1 As New OleDb.OleDbDataAdapter
Dim ConnectString As OleDb.OleDbConnection = New OleDb.OleDbConnection
DbConnect(ConnectString)
Try
Dim params_to_search As String = txtParam.Text
If rbtnempID.Checked = True Then
SQLString = “SELECT * FROM tblEmployee_Users WHERE ID=”
SQLString = SQLString & Trim(txtParam.Text)
Else
SQLString = “SELECT * FROM tblEmployee_Users WHERE Lastname LIKE “
SQLString = SQLString & “‘” & txtParam.Text & “%’”
End If
If params_to_search.Length > 0 Then
DataAdapter1 = New OleDb.OleDbDataAdapter(SQLString, ConnectString)
DataAdapter1.Fill(dtdbEmp)
DataGridView1.DataSource = dtdbEmp
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
DbDisconnect(ConnectString)
Posted by atishrajub
Posted by atishrajub
Posted by atishrajub 
