Thank you very much, that worked great. Now I am getting the same error referring to the second DLookup statement. I incorporated your previous suggestion and changed it to:
Struserlevel = DLookup("strlevel", "UserNameAndPassword", "[InTblUserName]='" & Me.UserName.Value & "'")
but the error...