deny some fields from some users

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is there a way to have some users gain access to some fields on a form and
prevent other users access to those fields from the same form based on their
log-in ids?
 
accessdesigner said:
is there a way to have some users gain access to some fields on a form and
prevent other users access to those fields from the same form based on
their
log-in ids?

Yes. In the form's Current event:

If CurrentUser = "whatever" Then
Me.Control1.Locked = True
Else
Me.Control1.Locked = False
End If

Keith.
www.keithwilby.com
 
that's sweet! ... is CURRENTUSER an actual programming code that searches
for (reads) the actual user name? and do i use the actual user name in place
of "whatever"?
 
accessdesigner said:
that's sweet! ... is CURRENTUSER an actual programming code that searches
for (reads) the actual user name? and do i use the actual user name in
place
of "whatever"?

CurrentUser is a function that returns the name of the current Access user.
If you've applied security then this will be the user's account name. If
you haven't then it will be "Admin" and you will have to use the network
user ID instead:

http://www.mvps.org/access/api/api0008.htm
 
Back
Top