claytonjgordon
Technical User
Can you use two text fields in the criteria section of the Dlookup function?
I'm trying to create a feature where it takes the user's network ID using
Code:
Me.TempID = Environ("username")
and then compares it to a table where I have various users which I want to have exclusive access to a spesific feature. i.e., if me.tempID = one of the user names from the table, then it will allow the action. Otherwise, it will pop up a msgbox or something.
I can get DLookup to work when I'm using fields that are number based in the criteria, but I'm getting a "you canceled the previous operation' error when I use text fields.
Code:
VarID = DLookup("[FULLNAME]", "UserTbl", "[USERID] =" & Me!TempID)
Dominus Nihil
(Master of Nothing)