Two *BIG BIG* mistakes.
(1) In your queries:
sql= "SELECT File_Data" & "FROM [registration] " ...
You have NO SPACE between "File_Data" and "FROM". (and then between "Telephone" and "FROM" in the other query.)
*WHY* do you break up the string like that, in any case??? Keep it SIMPLE:
Code:
sql = "SELECT File_Data FROM [registration] WHERE City LIKE '" _
& Replace(request.Form("txtsearch"), "'", "''") & "%' "
strSearch = "SELECT Brief,Area,City,Country,Telephone FROM [registration] " _
& "WHERE City LIKE '" & Replace(request.Form("txtsearch"), "'", "''") & "%' "
(2) The BIGGER error:
Code:
rsSearch.open strSearch,strSql,strconn,3,3
You can only use *ONE QUERY* per recordset!!! That code makes no sense at all. Trying to use two different queries at the same time.