User Name

  • Thread starter Thread starter leungkong
  • Start date Start date
L

leungkong

I want to make a form, for example a leave application form.
when the staff sumit the form, admin will receive a mail and admin's
database will be marked some information to calculate the balance of annual
leave.

I used Application.UserName to make a form.
But I find that some people have changed their user name or remove the user
name.
for example, the deflaut name should be "mkelly", but their change it to
"Mick Kelly".

So, I cannot match the user ID in database.

Can I get the computer Login name in Macros?
Thanks in advance.
 
Thanks Stanley,

But I wanna know the difference of Environ("USERNAME") and
application.username
Could you please explain? Many thanks again.
 
if you go to help/about, you'll see the application.username, the name you
supplied when you installed the product.
environ("username") is the name you logged into windows with.
 
Using Application.Username you can set or get the current user name. This can
also be accessed via menu>Tools>General>UserName.........whereas 'Environ'
returns a string associated with an OS environment.

If this post helps click Yes
 
Back
Top