J
Jeff Monroe
I have a database where I have customized the user login function. My
table (tblEmployees) contains four fields (lngEmpID, strEmpName,
strEmpPassword, strAccess). When launched, the user selects their
EmpName from a combo-box and enters their EmpPassword.
What I cannot figure out is how to get their Access (access level:
Admin, User, Viewer) from tblEmployee and use it to limit buttons,
forms and user data (allow the user to edit their data in a form, but
not see other's).
I tried using DLookup() in the form Load event:
('strAccessLevel = DLookup("[strAccess]", "[tblEmployees]", "lngEmpID =
lngMyEmpID"))
But I appear to be way off. I am trying to use lngEmpID determined at
login (lngMyEmpID is a variable set in a separate module).
How do I get the data from Access (field in tblEmployees) to use in a
form's Load event in order to limit button, form access to non-Admin
users? How do I filter tblEmployee data in form based on the EmpID or
EmpName logged in?
Thanks.
Jeff Monroe
table (tblEmployees) contains four fields (lngEmpID, strEmpName,
strEmpPassword, strAccess). When launched, the user selects their
EmpName from a combo-box and enters their EmpPassword.
What I cannot figure out is how to get their Access (access level:
Admin, User, Viewer) from tblEmployee and use it to limit buttons,
forms and user data (allow the user to edit their data in a form, but
not see other's).
I tried using DLookup() in the form Load event:
('strAccessLevel = DLookup("[strAccess]", "[tblEmployees]", "lngEmpID =
lngMyEmpID"))
But I appear to be way off. I am trying to use lngEmpID determined at
login (lngMyEmpID is a variable set in a separate module).
How do I get the data from Access (field in tblEmployees) to use in a
form's Load event in order to limit button, form access to non-Admin
users? How do I filter tblEmployee data in form based on the EmpID or
EmpName logged in?
Thanks.
Jeff Monroe