Re: Logon
From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 01/17/05
- Next message: Van T. Dinh: "Re: Event OnChange AfterUpdate not start when change in VBA"
- Previous message: Van T. Dinh: "Re: Why does "<>" not produce a 3021 error as does "=" in recordset"
- In reply to: HJD: "RE: Logon"
- Next in thread: Van T. Dinh: "Re: Logon"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 Jan 2005 11:32:12 -0500
Note, though, that that's not a particularly secure way, as it's trivial to
reset Environment Variables (using the Set command)
A far superior approach is to use the GetUserName API.
http://www.mvps.org/access/api/api0008.htm at "The Access Web" is a complete
example.
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (No private e-mails, please) "HJD" <HJD@discussions.microsoft.com> wrote in message news:88AB6DC3-E8A0-426B-9493-AB6CF65339C3@microsoft.com... > Hi Alvin > The easiest way is to check the environment variable Username; > > mUserName = VBA.Interaction.Environ("USERNAME") > msgbox mUserName > > Greetings > H > > "Alvin Hansen" wrote: > > > Hi!! > > > > I try to find my username > > i logon to a server with a name > > but on my Pc i am "Admin" so if i use > > currentusername i get "admin" and not my name i > > use to logon to the server, is there a way to grab the username?? > > > > Best regards alvin > >
- Next message: Van T. Dinh: "Re: Event OnChange AfterUpdate not start when change in VBA"
- Previous message: Van T. Dinh: "Re: Why does "<>" not produce a 3021 error as does "=" in recordset"
- In reply to: HJD: "RE: Logon"
- Next in thread: Van T. Dinh: "Re: Logon"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|