Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2004
    Posts
    660

    Unanswered: auto display the username

    Hello, i have a database that is Access as front end, sql server as backend. I want to have a field called "EnterBy", when the user login the computer, it can automatically display his name on the "EnterBy". How can I do that? Thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126
    You can create a form during the initial login into the db, that form would eventually become invisible and you could always refer to its username field when you enter the data.
    Second option is to use a Windows' current local user information and automatically input it into the form as the user is entering the information. I have both of these in place

  3. #3
    Join Date
    Mar 2004
    Posts
    660
    Thanks, Can you give me more detail how to do it. I am not familar with it. Thanks again!

  4. #4
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    to get username,

    debug.Print environ("UserName")

    since different versions of access and different windows versions might produce different results, you can try iterating through the variables of environ to see if one of them produces ur result (if the above doesn't work)

    for i = 1 to 100
    debug.Print environ(i)
    next

    the environ array gives a whole list of information bout the computer, network, etc..

  5. #5
    Join Date
    Mar 2004
    Posts
    660
    Thanks, i will try and let you know. Have a nice day!

  6. #6
    Join Date
    Mar 2004
    Posts
    660
    By the way, we use Access2002 And window 2000 server.

  7. #7
    Join Date
    Mar 2004
    Posts
    660
    Thank you very much! I got it.

  8. #8
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    not a problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •