-
I need some help with a query to get data from a mdb file,
the code so far is working great but i need this last piece.
Data1.RecordSource = _
"SELECT Data_T.Projektnummer, Data_T.Klant, Data_T.Projektnaam, Data_T.Aard, Data_T.Status " & _
"FROM Data_T " & _
"WHERE Klant = 'Test'"
Data1.Refresh
With this code i can get every Klant with the name Test but I also need Klant with the name
TestA or Atest.
Thanx
-
Try this
try using "like" and wild card "%"
"SELECT Data_T.Projektnummer, Data_T.Klant, Data_T.Projektnaam, Data_T.Aard, Data_T.Status "
& _
"FROM Data_T " & _
"WHERE Klant like '%Test'"
-
Will this better?
I think wild card * is more better.
Data1.RecordSource = _
"SELECT Projektnummer, Klant, Projektnaam, Aard, Status " & _
"FROM Data_T " & _
"WHERE Klant LIKE '*est*'"
Data1.Refresh
Edited by Chris on 03-09-2000 at 01:03 PM
-
Thanx Chris this is what i needed