I am attempting to lookup a variable that matches the two given criteria. Please see script below:
Dim usr As String
Dim pafa As String
usr = DLookup("UserID", "tt_CurrentUser")
pafa = DLookup("PassFail", "dbo_TestDetail", [WHERE "dbo_TestDetail.TestIndex" = " & Me!JobLU & " And "dbo_TestDetail.SN" = " & Me!SN & "])
As shown, pafa is the variable I am having issues with.
Run-time error '2465' pops up with a message reading "Manufacturing Test Manager can't find the field '|1' referred to in your expression".
When I hit Debug, line 4 is highlighted. " & Me!JobLU & " and " & Me!JobLU & " are both the correct values when I hover my mouse over the text.
What am I doing wrong when defining these two criteria?
Also, pafa is going to equal either "Fail" or Null.