I am in need for using a concatrelated field in a report. The data is pulling from a seperate query. I cannot figure out how to get the results by adding a text box with the code in the ControlSource.
I created a report that correctly displays the concat as needed. However, when I add it as a subreport and link both using "ClassID" no data is displayed in the subreport and generates the following error:
Error 3075: Syntax error (missing operator) in query Expression 'ClassID='.
Here is the SQL query that I used that works:
SELECT ClassAssigned.ClassID, ConcatRelated("Name","ClassAssigned_Instructors","ClassID = " & [ClassID]) AS InstructorList
FROM ClassAssigned
GROUP BY ClassAssigned.ClassID, ConcatRelated("Name","ClassAssigned_Instructors","ClassID = " & [ClassID])
HAVING (((ClassAssigned.ClassID) Is Not Null) AND ((ConcatRelated("Name","ClassAssigned_Instructors","ClassID = " & [ClassID])) Is Not Null));
I added the "Is Not Null" trying to resolved the 3075 error, but, this did not help.
I am using four tables for this report:
I created a report that correctly displays the concat as needed. However, when I add it as a subreport and link both using "ClassID" no data is displayed in the subreport and generates the following error:
Error 3075: Syntax error (missing operator) in query Expression 'ClassID='.
Here is the SQL query that I used that works:
SELECT ClassAssigned.ClassID, ConcatRelated("Name","ClassAssigned_Instructors","ClassID = " & [ClassID]) AS InstructorList
FROM ClassAssigned
GROUP BY ClassAssigned.ClassID, ConcatRelated("Name","ClassAssigned_Instructors","ClassID = " & [ClassID])
HAVING (((ClassAssigned.ClassID) Is Not Null) AND ((ConcatRelated("Name","ClassAssigned_Instructors","ClassID = " & [ClassID])) Is Not Null));
I added the "Is Not Null" trying to resolved the 3075 error, but, this did not help.
I am using four tables for this report:
- Class (which is the main table - Class Title, Start Date, etc)
- ClassLog (which is used for the Main Report- Information given, breaks, etc)
- ClassAssigned (this links Students and Instructors to Class)
- Instructors (holds instructor information Name, email, etc)