I've found multiple examples on search engines on how to use vlookup, but can't find one for how to use it with an int value.
This is what I have in my VBA and I get an error of
Code:
Syntax error in string in query expression 'UserID=70"
I'm assuming this is because the field I am trying to map to UserID is a Number type.
This is my full Dlookup statement, what do I need to do to fix this?
Code:
If CStr(rst.Fields(i).Value > 5 Then
a = DLookup("EmpName", "tblEmployeeInfo", "UserID=" & rst.Fields("UserID") & "'")
End If