dwarvenmilitia
Programmer
Hi...
I have a small problem and I know it will be simple as anything. I have a text box and if something is entered it ammends the SQL query with the code below. The thing is I want it to search dancers.Name as well as dancers.Surname with the same string of text from the text box. (This is ASP and Access DB I'm working with).
I copied the SQL and entered it under the first but changed it to dancers.Name but it stuffs up any search by returning no values.
This is the code which works fine for a surname but a name field has to be searched eith the same 'varText' string.
Any help would be greaetly appreciated.
Life is like a box of chocolates. When things get hot it all turns to mush.
I have a small problem and I know it will be simple as anything. I have a text box and if something is entered it ammends the SQL query with the code below. The thing is I want it to search dancers.Name as well as dancers.Surname with the same string of text from the text box. (This is ASP and Access DB I'm working with).
I copied the SQL and entered it under the first but changed it to dancers.Name but it stuffs up any search by returning no values.
This is the code which works fine for a surname but a name field has to be searched eith the same 'varText' string.
Code:
If (Request.Form("Text") <> "") Then
strSQL = strSQL & " AND dancers.Surname LIKE '%" & varText & "%' "
End If
Any help would be greaetly appreciated.
Life is like a box of chocolates. When things get hot it all turns to mush.