Hi all,
I have an access application. I have a login form, in MS Access. Currently, I'm saving the user name, password, security level(User,Admin) and their email , in a table 'Table1' in access table. So when the user opens the login form, he/she enters the user name and password and from that form on clicking the submit button, I authenticate against 'Table1' and redirect to other form, by carrying their name and displaying it on other forms.
Now, I like to get the user name from the domain login ( active directory) on their computer so they don't have to have a separate password for this app and keep entering everytime.
Ideally, when they click Login form I automatically capture their login name from their domain login into the computer and using the 'table1' in access, I can find the security level and direct to other forms, I also like to capture their email from active directory if possible.
I will appreciate if somebody can tell me how I can do that.
Thank you in advance.
Thanks you.Does this go on on click event of a button?
I tried to put the code you have provided on a on click event of a button, to see if I can get the user name.It says expected End of Sub.When I add End Sub, it still says End Sub expected.
At least to test, I'm trying to pass the user name from your code to a text box Tbox in my form on a click of event of a button. I would appreciate if you can tell me what I'm missing.
Thanks