writing code.......
if ubound (strDescSplit) = 0 or ubound (strDescSplit) = 1 then ' only one word, we don't care
strSql = "SELECT * FROM [MITDES Item Description Master File] WHERE ((([MITDES Item Description Master File].[Description I1DESC]) Like '%" & DESC & "%'))"
else ' could be a string or cold be boolean logic.. need to test for AND / OR then other stuff is a string
call booleanInfo(Desc,strBoolWord,FoundAndOr,strLeft,strRight)
'check for found...
if foundAndOr = 0 then ' didn't find it, so it's just a big ass string we are searching on
strSql = "SELECT * FROM [MITDES Item Description Master File] WHERE ((([MITDES Item Description Master File].[Description I1DESC]) Like '%" & DESC & "%'))"
else
select case strBoolWord
case "AND"
strSQL = "SELECT * FROM [MITDES Item Description Master File] WHERE ((([MITDES Item Description Master File].[Description I1DESC]) Like '%" & strLeft & "%' And ([MITDES Item Description Master File].[Description I1DESC]) Like '%" & strRight & "%'))"
'Response.Write STRSQL & "<BR>"
case "OR"
strSql = "SELECT * FROM [MITDES Item Description Master File] WHERE ((([MITDES Item Description Master File].[Description I1DESC]) Like '%" & strLeft & "%')) OR ((([MITDES Item Description Master File].[Description I1DESC]) Like '%" & strRight & "%'))"
end select
end if
end if