hi, im new in vb6
how to search in datagrid where every keyword you type wil display the record
found in database? here's my code in saving
pls ned help here....this is our thesis
God Bless>thanks.
Sub search()
'search if student is registered then
With ado
.ConnectionString = connectdb
.RecordSource = "Select * from info where Barcode = '" & Text2 & "'"
.Refresh
If .Recordset.RecordCount > 0 Then
Text3 = ado.Recordset!Barcode
Text4 = ado.Recordset!fname
Text5 = ado.Recordset!lname
Text6 = Date
'student attendance check
Call add
End If
End With
End Sub
Public Sub add()
'save to attendance record
With adoadd.Recordset
.AddNew
!Barcode = Text3
!First_Name = Text4
!Last_Name = Text5
!Date = Text6
.Update
MsgBox "save", vbInformation, "message"
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
End With
DataGrid1.Refresh
End Sub