I have a solution, of kinds.
Code:
SELECT unit_id, unit_title, unit_no FROM qry_test LEFT JOIN qry_test2 ON qry_test.unit_id = qry_test2.unit_id WHERE qry_test2.unit_id Is Null
This uses the results of two other queries and subtracts the results of the one from the other (a MINUS query, if you will).
The following is the SQL of the query called qry_test
Code:
SELECT unit_id, unit_title, unit_no FROM tbl_units WHERE int_level)=3 GROUP BY unit_id, unit_title, unit_no
The following is the SQL from qry_test2
Code:
SELECT course_id, unit_id FROM tbl_course_units WHERE course_id=2
The results are correct but I now need to either convert this into one recordset command (set rst=...) or work out how to combine the results of two recordsets into a third, or run the final query within VBA, still being able to use the returned values inside the code.
Would it be as simple as:
Code:
Set rst = CurrentDb.OpenRecordset("SELECT unit_id, unit_title, unit_no FROM qry_test LEFT JOIN qry_test2 ON qry_test.unit_id = qry_test2.unit_id WHERE qry_test2.unit_id Is Null")
???