SQL错误,返回空白结果

时间:2016-06-23 06:32:20

标签: sql ms-access join ms-access-2003

我在使用sql查询时遇到问题,它给出了一个错误,指出不支持Join Expression

这是我的sql

SELECT [course code] & " - " & [Year level id] AS [Course&Year],
tblRegistrationInfo.[Student ID], tblStudent.[ID Number], 
[qryCharges(All)bong].AccountTitle AS Fee,
-IIf(IsNull([qrypayment(all)bong].[amount]),
0,
[qrypayment(all)bong].[amount]) AS [Amount Paid],
[qrycharges(all)bong].[sumofAssessment]-[amount paid] AS Balance,
[Due]+MyRoundAccount([due],5) AS [Amount Due],
IIf([qrycharges(all)bong].[accounttitle]<>"School fee",
[qrycharges(all)bong].[sumofAssessment]-([amount paid]),
IIf([qrycharges(all)bong].[sumofAssessment]*[Percent Charge]-([amount paid])<=0,
0,
[qrycharges(all)bong].[sumofAssessment]*[Percent Charge]-([amount paid]))) AS Due,
tblTerm.Term,
[Last Name] & ", " & [Given Name] & " " & Left([Middle Name],1) & "." AS Name,
qryStudentScholar.Scholarship, tblCourse.[Course ID],
tblRegistrationInfo.[Year Level ID], [qryCharges(All)bong].SumOfAssessment    
FROM tblPercentCharged 
INNER JOIN tblTerm ON tblPercentCharged.[Term ID] = tblTerm.[Term ID], tblStudent 
RIGHT JOIN (tblCourse 
INNER JOIN (tblCSSHeader INNER JOIN (((tblRegistrationInfo LEFT JOIN qryStudentScholar ON tblRegistrationInfo.[Student ID] = qryStudentScholar.[Student ID]) 
INNER JOIN [qryCharges(All)bong] ON tblRegistrationInfo.[Student ID] = [qryCharges(All)bong].[Student ID]) 
LEFT JOIN [qryPayment(All)bong] ON ([qryCharges(All)bong].[Student ID] = [qryPayment(All)bong].[Student ID]) AND ([qryCharges(All)bong].AccountTitle = [qryPayment(All)bong].[Account Title])) ON tblCSSHeader.[CSS Header ID] = tblRegistrationInfo.[CSS Header ID]) ON tblCourse.[Course ID] = tblCSSHeader.[Course ID]) ON tblStudent.[Student ID] = tblRegistrationInfo.[Student ID]

WHERE (((tblCourse.[Course ID])=[Forms]![frmPrintFinancialAssessment]![c79])
AND ((tblRegistrationInfo.[Year Level ID])=[Forms]![frmPrintFinancialAssessment]![c81]) 
AND ((tblPercentCharged.[Term ID])=[Forms]![frmPrintFinancialAssessment]![cboTerm]))

ORDER BY [course code] & " - " & [Year level id],
tblRegistrationInfo.[Student ID],
tblStudent.[ID Number];

它会出错或只显示没有数据的页眉

如何解决此问题?

0 个答案:

没有答案
相关问题