The following Query is giving me error 3061 too few parameters expected 3. Please help me to solve the problem :
SELECT DISTINCT ExportResults.Numbers, "Dear Parent. " & Left(DLookUp("[Term]","[Terms]","TermID =" & [rTermID]),1) & " " & [rTermID] & " " & ConcatRelated(" Right([Class_Year],2)","[ExportResults]","rPupilID =" & [rPupilID]) & " results for " & ConcatRelated(" [FName]","[Pupil]","PupilID =" & [rPupilID]) & " " & ConcatRelated(" [SName]","[Pupil]","PupilID =" & [rPupilID]) & " " & ConcatRelated("Left([SubjectDiscript],3) & ' '& [tResult]","[ExportResults]","rPupilID =" & [rPupilID]) AS Msg
FROM ExportResults INNER JOIN Pupil ON ExportResults.rPupilID = Pupil.PupilID;
SELECT Results.rPupilID, ParentGuardian.Phone1 AS Numbers, "Dear Parent. " & Left(DLookUp("[Term]","[Terms]","TermID =" & [rTermID]),1) & " " & [rTermID] & " " & Right([Class_Year],2) & " results for " & [FName] & " " & [SName] AS Message, Left([SubjectDiscript],3) & " " & Format([tResult],"#") AS Message2, [FName] & " " & [SName] AS [Names], Results.Class_Year, Results.rClass, Left([rClass],2) AS myClass, Results.rTermID, Subject.SubjectDiscript, Format(100/[TotalMarks]*[MarksScored],"#") AS tResult
FROM Subject RIGHT JOIN ((ParentGuardian RIGHT JOIN Pupil ON ParentGuardian.ParentGdnID = Pupil.ParentID) LEFT JOIN Results ON Pupil.PupilID = Results.rPupilID) ON Subject.SubjectID = Results.rSubjectID
WHERE (((Results.Class_Year)=[Forms]![SelectExptRst]![txtYear]) AND ((Results.rClass)=[Forms]![SelectExptRst]![txtGrade]) AND ((Results.rTermID)=[Forms]![SelectExptRst]![txtTerm]));
SELECT DISTINCT ExportResults.Numbers, "Dear Parent. " & Left(DLookUp("[Term]","[Terms]","TermID =" & [rTermID]),1) & " " & [rTermID] & " " & ConcatRelated(" Right([Class_Year],2)","[ExportResults]","rPupilID =" & [rPupilID]) & " results for " & ConcatRelated(" [FName]","[Pupil]","PupilID =" & [rPupilID]) & " " & ConcatRelated(" [SName]","[Pupil]","PupilID =" & [rPupilID]) & " " & ConcatRelated("Left([SubjectDiscript],3) & ' '& [tResult]","[ExportResults]","rPupilID =" & [rPupilID]) AS Msg
FROM ExportResults INNER JOIN Pupil ON ExportResults.rPupilID = Pupil.PupilID;
SELECT Results.rPupilID, ParentGuardian.Phone1 AS Numbers, "Dear Parent. " & Left(DLookUp("[Term]","[Terms]","TermID =" & [rTermID]),1) & " " & [rTermID] & " " & Right([Class_Year],2) & " results for " & [FName] & " " & [SName] AS Message, Left([SubjectDiscript],3) & " " & Format([tResult],"#") AS Message2, [FName] & " " & [SName] AS [Names], Results.Class_Year, Results.rClass, Left([rClass],2) AS myClass, Results.rTermID, Subject.SubjectDiscript, Format(100/[TotalMarks]*[MarksScored],"#") AS tResult
FROM Subject RIGHT JOIN ((ParentGuardian RIGHT JOIN Pupil ON ParentGuardian.ParentGdnID = Pupil.ParentID) LEFT JOIN Results ON Pupil.PupilID = Results.rPupilID) ON Subject.SubjectID = Results.rSubjectID
WHERE (((Results.Class_Year)=[Forms]![SelectExptRst]![txtYear]) AND ((Results.rClass)=[Forms]![SelectExptRst]![txtGrade]) AND ((Results.rTermID)=[Forms]![SelectExptRst]![txtTerm]));