
ADO Query into Access 97 Database using VB6
I am trying to make an ADO query into an MS Access 97 database using VB6
szSeek is the searchstring coming from a textbox in a form
If szSeek = "" Then
'If the is not searchstring give me all records in the database
sSQL = "select
KundeID,FirstName,LastName,Address,Firm,HomePhone,WorkPhone,AltPhone,Notes
from Kunde Order by KundeID"
Else
'Search for records based on the szSeek variable
sSQL = "select
KundeID,FirstName,LastName,Address,Firm,HomePhone,WorkPhone,AltPhone,Notes
from Kunde _
where Lastname = '" & szSeek & "' Order by LastName "
End If
Say that I want to search for all the records with the lastname = Jensen
the query works just fine 2 records comes up.....!!
the problem come when I just enter 'Jen' in the szSeek variable, it finds no
records..!!
It is possible to do a search using only partial searchstrings with some
sort of wildcards .??
Rico R. Jensen