Help with LIKE Syntax conversion

dj_mix

Registered User.
Local time
Today, 12:14
Joined
Aug 30, 2006
Messages
39
Hello

I'm trying to convert my exsting LIKE Command to search Contians a word.

Example currently it will search for word starting with word in the search box.

I type in 2006, it will only look for project names starting with 2006.

I would like to Motify the search to "Contain" 2006 in the field anywhere.

Here's the code I like to convert.

"SELECT * FROM [qryProjects]" & "[PROJECT] LIKE """ & Me.txtSearchString2 & "*"" AND "
 
Put the astrik in front of and behind the target
LIKE "*anything*"
 
Got it to work

"SELECT * FROM [qryProjects]" & "[PROJECT] LIKE ""*" & Me.txtSearchString2 & "*"" And "
 

Users who are viewing this thread

Back
Top Bottom