well, you cannot return one line per student in this case, if the student has more than one class that is not finished. You want course names, right? If so, you can't do it with a dataset, but you can manipulate that data through forms/rpt's to make it look that way.
as far as what you said you want, it's impossible to give you that because the tables and fields that you showed me doesn't give the information that someone would need to produce the answer. so here's what you can get, based on what you gave us:
To get a list of your students and what courses they completed:
Code:
select students.student_code, Completed_Courses.course_code
from students inner join Completed_Courses on
Completed_Courses.student_code = students.student_code
Now, if you wanted a COUNT of the number of the courses each student has completed, you CAN return one line per student:
Code:
select students.student_code, count(Completed_Courses.course_code) as Num_Completed
from students inner join Completed_Courses on
Completed_Courses.student_code = students.student_code
GROUP BY students.student_code
Your 'courses' table doesn't tell me much. There is no information given by you to help determine how an incomplete course is determined. The only thing that can be guessed, is that if a course is not in table 3, then the student didn't take it, but that isn't enough to determine whether or not the student should've taken it, or was signed up. Info about those sort of things would get the more advanced answer you want.