hi programming masters! i need your help..how can i SEARCH a record in a database and display the results?? example: if i type an ID number or a name on the text box and click the search button it will look for the records and display it..
i have a search button (cmdSearch) and a text box (Text1)..
im using ms access
DATABASE NAME = ListofMemebers
tablename= Census
fieldnames:
ID
LastName
FirstName
MiddleName
Age
Sex
BirthDate
BirthPlace
Address
ContactNo
note:
im using this codes:
Private Sub cmdSearch_Click()
Dim con As ADODB.Connection
Set con = New ADODB.Connection
Dim rsSearch As ADODB.Recordset
Set rsSearch = New ADODB.Recordset
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\ListofMembers.MDB;Persist Security Info=False"
rsSearch.Open "SELECT * FROM Census WHERE ID LIKE " & "'" & Text1.Text & "'", con, adOpenStatic, adLockOptimistic
' i dont know whats next....
rsSearch.Close
con.Close
End Sub