我嵌套了两个dlookup函数,它似乎不起作用。请协助?
问题:
表一包含学生成绩:

----------
Student_ID     Name      Grade
2892838392     Name1      A+
2892838398     Name3      D+
2892838397     Name2      B+
----------

表二包含字母等级之间的值转换
Grade          Value
A+             100
A              95
A-             90

我已经在一个查询中编写了两个dLookkup公式来提取信息。
Expr1: DLookUp("[Value]","[Grade_Scale]","[Grade]='TESTGRADE'")
Expr2: DLookUp("[Freshman - English]","[NJAE Applicant - NJAE GPA Calculator]","[ID]= " & [ID])

但是由于某种原因,当我将两者嵌套在一起时,在 View 中会出现#Error。
Student_Points: DLookUp("[Value]","[Grade_Scale]","[Grade]=" & DLookUp("[Freshman - English]","[NJAE Applicant - NJAE GPA Calculator]","[ID]= " & [ID]))

请协助

最佳答案

您的语法不正确。我认为,由kbball提交并在注释中提到的联接要容易得多,但是为了将来使用,这里是更正的语法:

Student_Points: DLookUp("[Value]","[Grade_Scale]","[Grade]= '" & DLookUp("[Freshman - English]","[NJAE Applicant - NJAE GPA Calculator]","[ID]= '" & [ID] & "'") & "'")

条件参数需要在要测试的值周围加上单引号,包括嵌套Dlookup的结果。

关于sql - 两个表之间的dlookup(嵌套dlookup不起作用),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39645286/

10-11 20:41