Error: Expected end of statement
What's wrong with this that's causing my error:
"Microsoft VBScript compilation error '800a0401'
Expected end of statement
/test/search2.asp, line 22
if request.form("f_lastname") <> "" then
^"
sql = "SELECT * FROM names WHERE date_time <> '' " _
if request.form("f_lastname") <> "" then
& "and last_name = " & request.form("f_lastname")
end if
==============
I've tried it a few different ways, but I keep getting the same error.
Thanks for the assistance!!
|