Hi, I am trying to do a 'Not In' query in access 2007 but the one below doesn't seem to work. It says that an operator is missing when i use the query builder. When i put it in the code as shown below it does not show anything. If i change the Not to In it shows the correct IN data. Any Ideas? Thanks
strSQL = "SELECT tblQ.[Q No] "
strSQL = strSQL + "FROM tblQ INNER JOIN tblAQ ON tblQ.[Q No] = tblAQ.[Q No] "
strSQL = strSQL + "WHERE (((tblQ.[Q No]) Not In ([tblAQ].[Q No])) AND ((tblAQ.ID)=[cboP])) "
strSQL = strSQL + "ORDER BY tblQ.[Q No];"
strSQL = "SELECT tblQ.[Q No] "
strSQL = strSQL + "FROM tblQ INNER JOIN tblAQ ON tblQ.[Q No] = tblAQ.[Q No] "
strSQL = strSQL + "WHERE (((tblQ.[Q No]) Not In ([tblAQ].[Q No])) AND ((tblAQ.ID)=[cboP])) "
strSQL = strSQL + "ORDER BY tblQ.[Q No];"