I have a tUsers table, with userID, Name, and Level
when user opens the db, the main menu form will open and read 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