hi,
I need a help.how can i SEARCH a record in a database using listbox and display the results?? For an example: if i select a destination on the listbox and it will look for the records on database and display it.
im using ms access and adodb connection.Below is my coding for my program
Dim con As New adodb.Connection
Dim r As New adodb.Recordset
con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & App.Path & "\db4.accdb;"
r.Open "SELECT Destination FROM tblFare , con, adOpenDynamic, adLockOptimistic, adCmdTex"
If r.BOF = True Or r.EOF = True Then
Label7.Visible = True
Exit Sub
Else
Text8.Text = r!Destination
Text9.Text = r!Fare
r.Close
End If