Kindly check your sql query, it seems like you've goofed up the variable names in your application.

Try and show the SQL query in a MsgBox before executing it.