I'm trying to pull some records from a table using the Like Operator. My code, behind a form is similar to:
varName = "B"
strSQLNames = "Select * from tblNames where last_name Like '" & varName* & "'" (note: all code is on same line in my project).
But of course I get a syntax error. I've tried multiple combinations but cannot get the correct syntax. Can anybody assist me with the correct syntax that would, in my example, give me all the last names that begin with B, using a Select stmt in that way?
Thanks for any assistance you can offer.
varName = "B"
strSQLNames = "Select * from tblNames where last_name Like '" & varName* & "'" (note: all code is on same line in my project).
But of course I get a syntax error. I've tried multiple combinations but cannot get the correct syntax. Can anybody assist me with the correct syntax that would, in my example, give me all the last names that begin with B, using a Select stmt in that way?
Thanks for any assistance you can offer.