Hiding controls dependant on user

smith844

Registered User.
Local time
Today, 22:33
Joined
Jul 29, 2005
Messages
13
Is it possible to hide text boxes/controls on forms dependant on the user ? I have a had a (quick) look at access security and it appears that it just enables read/write access to objects not controls on the objects.

Many Thanks in anticipation


Dave Smith
 
Yes, but it requires a table that stores the UserID and their Access level. You then use a DLookup using the CurrentUser function as criteria to get the Access level. Depending on level you can hide or show specific controls.

Example:

If DLookup("[Level]", "tblUsers", "[UserID = '" & CurrentUser() & "'") = "Reader" Then
Me.control.Visible = False
Else
Me.control.Visible = True
End If
 
Last edited:

Users who are viewing this thread

Back
Top Bottom