Users

E

Emma

Hi My database is password protected so that each user can log in with their
own password. How do I retrieve the username? I have a Table called Tbl Staff
which holds the users of the database under the name Staff Name. I tried
using [Tbl Staff]![Staff Name] but it doesn't grab the username.
 
B

Brendan Reynolds

Emma said:
Hi My database is password protected so that each user can log in with
their
own password. How do I retrieve the username? I have a Table called Tbl
Staff
which holds the users of the database under the name Staff Name. I tried
using [Tbl Staff]![Staff Name] but it doesn't grab the username.


The CurrentUser() function returns the user name of the currently logged-in
user.
 
D

Douglas J. Steele

By "password protected", do you mean that Access User-Level Security has
been applied, so that each user has to log into the application (providing a
user id and password), or are they simply providing a password, now user id?

If Access ULS has been applied, the CurrentUser() function will return their
log in ID.

The code from http://www.mvps.org/access/api/api0008.htm at "The Access Web"
will allow you to retrieve the current user's network id.
 
E

Emma

Thanks it was the CurrentUser() I was looking for. You guys are great!

Douglas J. Steele said:
By "password protected", do you mean that Access User-Level Security has
been applied, so that each user has to log into the application (providing a
user id and password), or are they simply providing a password, now user id?

If Access ULS has been applied, the CurrentUser() function will return their
log in ID.

The code from http://www.mvps.org/access/api/api0008.htm at "The Access Web"
will allow you to retrieve the current user's network id.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Emma said:
Hi My database is password protected so that each user can log in with
their
own password. How do I retrieve the username? I have a Table called Tbl
Staff
which holds the users of the database under the name Staff Name. I tried
using [Tbl Staff]![Staff Name] but it doesn't grab the username.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top