Is there a way I lock one or two fields on a Form based on user Access level?
We are trying to prevent Users from making changes to Fields A and B (just examples) but allow them to make changes on the rest of the form, while not restricting Admins.
Is there a way I lock one or two fields on a Form based on user Access level?
We are trying to prevent Users from making changes to Fields A and B (just examples) but allow them to make changes on the rest of the form, while not restricting Admins.
I have a tUsers table, userID,name,Level
when the main form opens, I get userID:
txtUser= environment("userName")
then I lookup the level,
txtLevel=Dlookup("[level]","tUsers","[userId]='" & me.txtUser & "'") & ""
now I lock fields according to level...
A,admin has all rights,M,manager has some, U,user get view only.
txtCity.locked= txtLevel="U"
txtName.locked = txtLevel<>"A"
ranman256...will I add the Dlookup("[level]","tUsers","[userId]='" & me.txtUser & "'") & "" to my login page or to the form I want to lock those fields?
I have two tables a tblUsers with: EmployeeID | Name | EmployeeTypeID
and
tblUserType with: ID | EmployeeType
Using the DLookup would it read: Dlookup("[EmployeeTypeID]","tUsers","[EmployeeId]='" & me.txtUser & "'") & ""