Dan,
I haven't tried it, but I've been told that the environment variable can be
changed by the user. As far as using the Windows Scripting method, that's
just one more thing to potentially go wrong. Also, the API will work on
older computers, such as NT4 that may not have WSH installed. Another
advantage of the API is that it is how Windows works and it should be
faster, although with the speed of today's machines that may not matter
much.
--
Wayne Morgan
MS Access MVP
"Dan Morgan" <us****@yahoo.com> wrote in message
news:fe**************************@posting.google.c om...
I've seen these api's but what's wrong with:
environ("username")
a built in vba function to get the value of the environmental variable
username.
or:
dim wshNetwork as object
dim strUserName as string
set wshNetwork = createobject("wscript.network")
strUserName = wshNetwork.username
set wshNetwork = nothing
just seems simpler.
"Wayne Morgan" <co***************************@hotmail.com> wrote in
message news:<aU******************@newssvr11.news.prodigy. com>... See if this will help.
http://www.mvps.org/access/api/api0008.htm
http://www.mvps.org/access/api/api0066.htm
http://www.mvps.org/access/api/api0062.htm
http://www.mvps.org/access/api/api0058.htm
And, although you say you've already worked this out, there may be some
more
ideas for you here on the computer name.
http://www.mvps.org/access/api/api0009.htm
--
Wayne Morgan
MS Access MVP
"David White" <fe********@gmail.com> wrote in message
news:6b**************************@posting.google.c om... > Hello - I have already developed a database that can identify the
> workstation ID of users logged into a specific database.
>
> I would additionally like to know the workstation users NTID (login
> name). How is this possible, if at all?
>
> Thanks in advance,
> David