I am getting a runtime error 2471 on the expression LoginID using Dlookup and dont know how to correct it.
My code is:-
LoginId is an Integer or Long and is evaluated correctly using Debug. But the Priv variant is returning Empty?
Could someone please advise
My code is:-
Code:
Dim LoginID As Integer
Dim Priv As Variant
LoginID = [basMyEmpID].lngMyEmpID
On Error GoTo Ad_Err
MsgBox (LoginID)
Priv = DLookup("[strAccess]", _
"[tblEmployees]", _
"[lngEmpID] = LoginID")
MsgBox (Priv)
Exit Sub
Ad_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub
Could someone please advise
Comment