I have a little search engine which searchs through a database <BR>called employees (fields: Titel, Url)<BR>Everything works fine but my problem is that it searchs only through <BR>one field (titel) in the database and not through all of them.<BR>The code for that would be:<BR><BR>if Request.form("DaInBox") &#060;> "" then<BR> query = query & combine<BR> Call parse("Titel", Request.Form("DaInBox"))<BR> combine = " OR "<BR>end if<BR><BR><BR>Anyone has an idea what i have to change that it works with all fields?<BR><BR>thanks for helping<BR><BR>heres the whole code:<BR><BR>&#060;%<BR>Set db = Server.CreateObject("ADODB.Connection")<BR>db.Open ("employees")<BR><BR>sub parse(field, s) query = query & combine & "(" <BR><BR>&#039if it begins and ends with a quote<BR>&#039use Mid to cut out what is between the quotes<BR><BR><BR> if Left(s,1) = """" and Right(s,1) = """" then<BR> query = query & field & " LIKE &#039%" _<BR> & Mid(s, 2, Len(s)-2) & "%&#039"<BR><BR>&#039 or if it has a plus (+) in it <BR><BR> elseif InStr(s,"+") > 0 then<BR> wordList = Split(s, "+") <BR> for word = 0 to UBound(wordList)<BR> query = query & field & " LIKE &#039%" & wordList(word) & "%&#039"<BR> if word &#060; UBound(wordList) then <BR> query = query & " AND "<BR> end if<BR> next <BR><BR>&#039 or if it starts with a minus (-)<BR><BR> elseif Left(s,1) = "-" then <BR> query = query & field & " NOT LIKE &#039%" _<BR> & Right(s, Len(s)-1) & "%&#039" <BR><BR>&#039 otherwise split on spaces <BR><BR> else<BR> wordList = Split(s)<BR> for word = 0 to UBound(wordList)<BR> query = query & field & " LIKE &#039%" & wordList(word) & "%&#039"<BR> if word &#060; UBound(wordList) then <BR> query = query & " OR "<BR> end if <BR> next <BR> end if<BR> <BR> query = query & ")" <BR>end sub <BR><BR>&#039sql statement for the query<BR><BR>if Request.form("DaInBox") &#060;> "" then<BR> query = query & combine<BR> Call parse("Titel", Request.Form("DaInBox"))<BR> combine = " OR "<BR><BR>end if<BR><BR>&#039now build the full query and run it<BR><BR>query = "SELECT * FROM employees" _ <BR>& " WHERE " & query & " ORDER BY Titel" <BR><BR>Set rs = db.execute(query)<BR>&#037;&#062;