Tyler,
>select course.courseid, count(assignment.courseid) as qty;
>from course left join assignment on course.courseid = assignment.courseid;
>where assignment.courseid = thisform.fancyfield1.text1.value;
>into cursor classi
>qty = alltrim(str(classi.qty))
>
>This worked for the one course:the one displayed on the form. Now when I get rid of the where statement, it doesn't count the assignments for each course. I only get one course with a total.
You need to add
GROUP BY course.courseid
after the "into cursor classi ;"