Hello all
I'm struggling with finding the proper syntax to use two variables with WHERE.
Using the actual values the SQL string works perfect:
But when I attempt to substitute variables for the values I receive errors (on execution) with every variation I test:Code:iSQLStr = "SELECT * FROM tblData1 WHERE tblData1.Card = 1 AND tblData1.exam= 6 ;"
Any suggestions greatly appreciated.Code:crd = 1, exam = 6 iSQLStr = "SELECT * FROM tblData1 WHERE tblData1.Card= & crd AND tblData1.exam= & exam ;"