Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: Asking for username program

    Hi,

    In Excel,
    we can change username in Tools->Options->General tab

    Does the MS Access have this option?

    Because I cannot find it in the MS Access.
    Can we write the code for change the username by VBA?

    I just want to know that. Because I know that when I change the username in Excel, MS Access's username will change itself automatically.

    Thanks.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,476
    Provided Answers: 11
    It must be in The regedit some where

    I use this
    Code:
    Function Who_is_It(what)
    Set objNet = CreateObject("WScript.NetWork") 
    select Case What
    case "Name"
    	Who_is_It = objNet.UserName
    case "Computer"
    	Who_is_It = objNet.ComputerName
    Case "Who"
    	strsAMQuery = objNet.UserName
    	Fname   = Left(strsAMQuery,1) 
    	Surname = Mid(strsAMQuery,2,1)
    	if Surname = "." then Surname = Mid(strsAMQuery,3,1)
    	Who_is_It = ucase(Left(fname,1)) & ucase(left(Surname,1))
    End Select
    Set objNet = Nothing
    End Function
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

Posting Permissions

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