Access 2000 - Is it possible to access user/group information incode?

  • Thread starter Thread starter Luke Dalessandro
  • Start date Start date
L

Luke Dalessandro

I've done quite a bit of searching on this, and either I'm not using the
right terminology, or I just don't get it.

I want to be able to access user and group information in modules
associated with my access database.

As a simple example: I want to enable a certain control on a form for a
certain group.

A second example: I want to log the user name for new records.

I have read that Access uses the username/password at login only, and
translates this into a PID. Can I get access to this and back into the
user name/group any way? Or can I hack it by trying to do something that
I know is group restricted (ie add a new record/undo which is only valid
for the group that I want the control enabled for, and catch any
associated security violation error).

I don't really care about the security of the DB, I just need to track
users and provide sub-form group based control functionality/visibility.

Thanks in advance,
Luke Dalessandro
 
Luke said:
I want to be able to access user and group information in modules
associated with my access database.

As a simple example: I want to enable a certain control on a form for
a certain group.

There are a series of functions in the security FAQ that you can use to
determine if the current user is a member of a certain group
http://support.microsoft.com/?id=207793
A second example: I want to log the user name for new records.

The CurrentUser() function will return the username.
I don't really care about the security of the DB, I just need to track
users and provide sub-form group based control
functionality/visibility.

In that case, maybe you don't need to use User-level security at all. You
could use the function at
http://www.mvps.org/access/api/api0008.htm
to get their network login name and enable/disable things based on that.
 
Beautiful! CurrentUser combined with the functions define in the FAQ are
exactly what I am looking for...

I can't understand why, in my millions of Google searches, I never ran
into this FAQ, it is a goldmine.

Thanks for your help,
Luke
 
Back
Top