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.
 

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

Similar Threads


Back
Top