Login Name versus Username

G

GeorgeMar

I am using Jet UserRoster to find out who is logged onto my Back End. Works
fine, the Computer name is correct, however, for the Login_Name I get the
name "Admin" on the server and my laptop. Instead I want the Username who is
connected. I have no idea where the name "Admin" has been set.

If I use the API "GetUserNameA", I get the appropriate user's name.

How can I get the Username (person's name) instead of the Login_Name in Jet
UserRoster?

many thanks
george
 
R

Robert Morley

You can't, as far as I know. The reason you get "Admin" is because that's
the user name that Access uses to log in to an unsecured database. If you
were to enable security and force users to log in, it would show the name
that they logged in with (which has nothing to do with their NT user name).

You can try doing a reverse lookup on the Computer Name to find out who's
currently logged in to that computer. This only works if the computer has
remote registry access enabled. Try
http://www.mvps.org/access/api/api0062.htm.



Rob
 
Top