Urt is right about the spacing. Also, if you're going to use the LIKE function, then your strings need wildcards. Try something like:
Set reccnc = dbTata.OpenRecordset("SELECT DISTINCT * FROM cnc WHERE wono LIKE '*" & a.Text & "*' AND ItemName LIKE '*" & b.Text & "*'")
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|