How to caputure current user account?

  • Thread starter Thread starter Dawn
  • Start date Start date
D

Dawn

Dear all,
In a Form Frm_Login, I want the textbox Txt_User_name automatically capture
the current user account.How to write code in the VBA?Thanks
Dawn
 
I've selected the source as =CurrentUser(),but it appears as "Admin",I want
to capture the userid what I input to login on this computer, it's a serial
of numbers.
 
The CurrentUser() will return the database login. If your db is secured,
then this can be very useful. However, otherwise, it will always return
Amdin which doesn't help much.

What you are looking to retrieve is the user's network login name/id. For
this use the code found at

http://www.mvps.org/access/api/api0008.htm
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
Daniel,
Many thanks

Daniel Pineault said:
The CurrentUser() will return the database login. If your db is secured,
then this can be very useful. However, otherwise, it will always return
Amdin which doesn't help much.

What you are looking to retrieve is the user's network login name/id. For
this use the code found at

http://www.mvps.org/access/api/api0008.htm
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
Back
Top