Hello Everyone
I found this code in a sample database and I need to re-use it in my database, but access keeps throwing errors at me. I did some digging and I think the cause of the error is that TempVars("EmployeeType") is a string in my database, but it is a number in the sample database where I got this code from. I think I need to alter the double/singe quotes. I just can’t seem to figure it out, a little help please.
UserAccess = Nz(DLookup("HasAccess", "tbl9EmployeeAccess", "EmployeeType_ID=" & TempVars("EmployeeType") & " AND FormName=' " & FormName & " ' "), False)