我想从存储它的表阈值中获取lower_limit值,但我总是得到:"Error RunTime 94: Invalid use of Null value"。我不希望子例程返回 lower_limit,它只对SearchAbnormalities的进一步步骤有用。我检查了表Threshold(其中 PK 由ID_parInput、rangeagein、gender组成)并且有对应于该选择的行。
Private Sub SearchAbnormalities(ByVal ID_parInput As Integer, ByVal gender As String, ByVal eta As Integer, Optional ByVal insertedSysValue As Integer, Optional ByVal insertedDiaValue As Integer, Optional ByVal measureValue As String)
Dim rangeagein As String
Dim lower_limit As Integer
Dim upper_limit As Integer
rangeagein = giveMeTheRange(eta)
Debug.Print ID_parInput, gender, rangeagein '>> 12, female, middle(31-60)
lower_limit = DLookup("lower_limit", "Threshold", "rangeage ='" & rangeagein & "' And ID_par = " & ID_parInput & " And gender = '" & gender & "'")
'...
End Sub