Access always puts in too many brackets for my liking.
I would exect the WHERE clause to be enclosed by brackets though, if only to make it obvious to me?
So I reckon you are missing a closing bracket at the end of the SQL ?
Perhaps try
Code:
SELECT students_rep.[lname], students_rep.[fname], students_rep.agm, [tblStudDiag].[diagnosis].Value, [tblStudDiag].[StartDate], [forms]![dailyreportdate]![rdate] AS reportdate, [tblStudDiag].duration, dateadd("d",[duration]-1,[StartDate]) AS EndDate, students_rep.nd_dsls & " " & students_rep.[taksi] AS Class
FROM students_rep INNER JOIN tblStudDiag ON students_rep.agm=[tblStudDiag].[student]
WHERE ([tblStudDiag].[StartDate]<=forms!dailyreportdate!rdate and dateadd("d",[tblStudDiag.duration]-1,[tblStudDiag.startdate]) >=forms!dailyreportdate!rdate);
or even
Code:
SELECT students_rep.[lname], students_rep.[fname], students_rep.agm, [tblStudDiag].[diagnosis].Value, [tblStudDiag].[StartDate], [forms]![dailyreportdate]![rdate] AS reportdate, [tblStudDiag].duration, dateadd("d",[duration]-1,[StartDate]) AS EndDate, students_rep.nd_dsls & " " & students_rep.[taksi] AS Class
FROM students_rep INNER JOIN tblStudDiag ON students_rep.agm=[tblStudDiag].[student]
WHERE [tblStudDiag].[StartDate]<=forms!dailyreportdate!rdate and dateadd("d",[tblStudDiag.duration]-1,[tblStudDiag.startdate]) >=forms!dailyreportdate!rdate;