search for x where y Like..

  • Thread starter Thread starter Mettá
  • Start date Start date
M

Mettá

I have a db search based on a number of fields, however I have hit a
problem, I need to specify = rather than LIKE but for some reason if returns
no records if I change like to equals

....WHERE (Descrip LIKE '%"&Search& "%' AND Cnty LIKE '%" &Search2& "%' AND
Pcd1 LIKE '%" &Search3& "%')

If I change the last part to Pcd1= ' %" &Search3&& "%')

The search fails?? Yet Search3 has a corresponding value

Any ideas what I am doing wrong?

Thanks M
 
Remove the wildcards when using "="...
Pcd1= '" & Search3 & "')

Bob Lehmann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top