so i tried with the brackets and it didnt make any difference to the outcome of the code
i tried a debug on the dlookup
Debug.Print Nz(DLookup("hasaccess", "tblhasaccess", "accesslvl=" & TempVars("AccessLevel") & " AND formname='" & Me.Name & "'"), False)
and it returns a -1, when it should...