LIKE problems in a query

J

Jeff

My two fields are:

[Participation ACE Convert Query].Program = "CITY"
Outings.ProgramID = "ACE/CITY/OASIS/Upper"

and the SQL in the query looks like:

ON ([Participation ACE Convert Query].Program Like "*" &
Outings.ProgramID & "*")

But I'm not getting a match based on this code. Could someone help me?

Thanks!

Jeff
 
J

John Spencer

You are comparing in the wrong direction.

ON ([Participation ACE Convert Query].Program Like "*" &
Outings.ProgramID & "*")

Should be

ON (Outings.ProgramID Like "*" &
[Participation ACE Convert Query].Program & "*")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
M

Marshall Barton

Jeff said:
My two fields are:

[Participation ACE Convert Query].Program = "CITY"
Outings.ProgramID = "ACE/CITY/OASIS/Upper"

and the SQL in the query looks like:

ON ([Participation ACE Convert Query].Program Like "*" &
Outings.ProgramID & "*")

But I'm not getting a match based on this code. Could someone help me?


You have them backwards

ON Outings.ProgramID Like "*" &
[Participation ACE Convert Query].Program & "*")
 
J

Jeff

You have them backwards

ON Outings.ProgramID Like "*" &
[Participation ACE Convert Query].Program & "*")

Geez, thanks... I'll blame it on the early hour on a Saturday!
 

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

Similar Threads


Top