how search and to display all data with refer to your search key in same field
tq in advance
06-02-2005 at 10:09 AM
|
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
Re: need help in data display
didnt understand anything.. are you using ADO/DAO, with data control or recordset objects... Place some code of yours (that is relevant to this subject) and point to where you are stuck...
____________________________
If you find the answer helpful, please mark this topic as solved.
how can i may possible to search and find datarecord in m.access using adodb and display it in listview.
the search term is will display any record witch match the search text ( just like using find in m/word ) for example iam search using key word " rahman " and my record only have "abd rahman " but still able to found "abd rahman " using "rahman"
(using ado record set)
thanks
####
Private Sub Command1_Click()
Dim strSQl As String
Dim litem As ListItem
'if there is nothing to search for then exit
If Text1.Text = "" Then
Exit Sub
End If
ListView2.ListItems.Clear
'make the search
strSQl = "SELECT * FROM surat"
strSQl = strSQl & " WHERE tajuk surat LIKE '*" & Text1.Text & "*'"
'show the found records
Dim ts As ADODB.Recordset
Set ts = New ADODB.Recordset
ts.Open "SELECT * FROM surat", "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\Program Files\E- file management\fail.mdb"
ts.open"(strSQL)"
If Not (ts.BOF And ts.EOF) Then
Do While Not ts.EOF
'List1.AddItem rs.Fields(1).Value