General information
Category:
COM, DCOM and OLE automation
Eric is correct about the %. In Access you use * and in SQL you use a %. What you might be missing is the single quotes around your supplied variable.
e.g.
"SELECT * FROM tblMyTable LIKE " & strVariableName & "*;"
is different from:
"SELECT * FROM tblMyTable LIKE '" & strVariableName & "*';"
It sounds like your error message is interpreting the * as a SQL command because it is not inside quotes. So if you are using SQL, make sure you use a %, and if your field is a character/string type, ensure you use the single quotes.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only