hfsitumo2001
Member
- Local time
- Today, 02:28
- Joined
- Jan 17, 2021
- Messages
- 365
Hello, I am gonna try like this class module on on load of each form in order to make user for Read_only on each form:
But instead of putting this code in every form, can we make it global function/module?, and in the user forms, we can just make if User Security=User2, function/module will work.
The other problem since when we login the login form will disappear and to to Navigation Menu
like this which is drill down menu. Maybe we should use TempVar? to hold the User2 from the log in form?, Any sample for this?
Thank you.
Frank
Code:
rivate Sub Form_Load()
Dim User AS String
Dim LoginType As Integer
User = Forms (Mavigation Form)!TxtLogin
LoginType = Dlookup("UserSecurity","TblUser","User2")
If LoginType = 2 Then 'limited user'
Me.AllowAdditions = Flase
Me.AllowEdits = False
Me.AllowDeletions = False
End IF
End Sub
But instead of putting this code in every form, can we make it global function/module?, and in the user forms, we can just make if User Security=User2, function/module will work.
The other problem since when we login the login form will disappear and to to Navigation Menu
like this which is drill down menu. Maybe we should use TempVar? to hold the User2 from the log in form?, Any sample for this?
Thank you.
Frank