S
steve
i posted a message the other day about a problem i'm having with the
enivornment.username property. Turns out i was a bit off on the
nature of the problem. so i'm trying again.
Like many of you, i have code behind my infopath form that uses
environment.username to determine the name of the person using the
form. This code has been running for years, with dozens of users.
It's aways been fine.
Now - for one particular user - the code no longer works. the
environment.username appears to be blank.
if I logon to Windows as this user, go to the command prompt, and
issue the "set" command, it appears that the appropriate value is
there (it shows USERNAME=janet.doe).
Yet, in my infopath form the following line doesn't work. It doesn't
even execute the Alert statement. Doesn't get an error, but just
skips the line without doing the Alert. like i said, for all others
on the project it works fine.
testName = Environment.UserName
thisXDocument.UI.Alert("Test - Who am I? " & testName)
i also have a select statement: Select Case Environment.UserName
that doesn't work for this user. it just seems to skip the statement
all together. doesn't fall into the Case Else branch like i would
expect of there wre no value in UserName.
Anybody have any idea? i'm drawing a blank.
thanks
enivornment.username property. Turns out i was a bit off on the
nature of the problem. so i'm trying again.
Like many of you, i have code behind my infopath form that uses
environment.username to determine the name of the person using the
form. This code has been running for years, with dozens of users.
It's aways been fine.
Now - for one particular user - the code no longer works. the
environment.username appears to be blank.
if I logon to Windows as this user, go to the command prompt, and
issue the "set" command, it appears that the appropriate value is
there (it shows USERNAME=janet.doe).
Yet, in my infopath form the following line doesn't work. It doesn't
even execute the Alert statement. Doesn't get an error, but just
skips the line without doing the Alert. like i said, for all others
on the project it works fine.
testName = Environment.UserName
thisXDocument.UI.Alert("Test - Who am I? " & testName)
i also have a select statement: Select Case Environment.UserName
that doesn't work for this user. it just seems to skip the statement
all together. doesn't fall into the Case Else branch like i would
expect of there wre no value in UserName.
Anybody have any idea? i'm drawing a blank.
thanks