I have three queries that return a student ID, a test ID, and a test status. These tests can be taken many times so the student may have many records where he/she passed the test, have "verified credit" (less than passing), be scheduled, failed, etc. I want to eventually make a join query from three queries. First I get a distinct record for each test a student passed:
qryPass
studentID
testID
testStatus
then a qry for every student that has verified credit for a test
qryVC
same fields as above but returns records where testStatus is "VC"
and then a query returning the tests that a student is scheduled to take.
qrySched
same fields as above, but testStatus is "Scheduled".
This is where I need help. I want to make a qry (call it qryVCandNotPassed) of all the student's test that have verified credit, but have not passed the test yet. So I want to return all records from
qryVC where the (studentID AND testID) are not in qryPassed
I have tried several subqueries but either get some cartesian product, no records, or all records.
If I can get that one right I should be able to chain the next one; student who have a test scheduled and have not passed or gotten VC.
I did this originally using a function in a calculated field which was simple worked correctly, but was really slow.
Thanks.
qryPass
studentID
testID
testStatus
then a qry for every student that has verified credit for a test
qryVC
same fields as above but returns records where testStatus is "VC"
and then a query returning the tests that a student is scheduled to take.
qrySched
same fields as above, but testStatus is "Scheduled".
This is where I need help. I want to make a qry (call it qryVCandNotPassed) of all the student's test that have verified credit, but have not passed the test yet. So I want to return all records from
qryVC where the (studentID AND testID) are not in qryPassed
I have tried several subqueries but either get some cartesian product, no records, or all records.
If I can get that one right I should be able to chain the next one; student who have a test scheduled and have not passed or gotten VC.
I did this originally using a function in a calculated field which was simple worked correctly, but was really slow.
Thanks.