First the db is on the network, so users already have to login to windows.
In the db, I have a tUsers table, with userID, Name, and Level
USERID, FIRSTN, LASTN, LEVEL
bob12, bob smith, M (manager)
pam4, pam jones,"" (user)
xman, charles, xavier, F (financial)
when user opens the db, the main menu form will open and grab the userID.
Then lookup that persons rights in order to enable/disable controls.
Code:
sub form_load()
dim vUserID, vLevel
vUserID = Environ("Username") 'get userID
'get level from user table
vLevel = Dlookup("[Level]","tUsers","[userID]='" & vUserID & "'")
'now, enable/disable items on form
select case vLevel
case "A" 'admin
'all is enabled
case "U" 'normal user
txtBox1.enabled = false
txtManager.enabled = false
case "M" 'manager
txtBox1.enabled = false
end select
end sub