You can search item through this code on keypress in datagrid, Like if you press 1 in textbox then all record starts from 1***** will be displayed, without hitting any other button.
Private Sub text_change()
With recordset
If .State <> adStateClosed Then
.Close
End If
.Open "select * from table where empid like'" & Text1.Text & "%'", con, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = recordset
End With
End Sub
comment if this code helps u
Private Sub text_change()
With recordset
If .State <> adStateClosed Then
.Close
End If
.Open "select * from table where empid like'" & Text1.Text & "%'", con, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = recordset
End With
End Sub
comment if this code helps u
its so help now i finish of my project its work XD thng a lot
ReplyDelete