E
Eric
I have created about 5 infopath forms, all with the same script code in the
Load event:
Sub XDocument_OnLoad(eventObj)
dim Shell
dim env
set shell = createobject("wscript.shell")
set env = shell.Environment("process")
ab = env("username")
XDocument.DOM.selectSingleNode("//my:txtUser").text = ab
End Sub
ab holds the username of the user opening the form.
this works, but then it goes wrong.
On form number 6 this code stops at the last line where field txtUser is set
to the value from ab.
If I leave this event out completely, the form errors on the next line where
I use the Xdocument.DOM.SelectSingleNode method.
How is this possible. it works in all the other forms, the fields are
existing.
pls. help, I'm really stuck.
rg,
Eric
Load event:
Sub XDocument_OnLoad(eventObj)
dim Shell
dim env
set shell = createobject("wscript.shell")
set env = shell.Environment("process")
ab = env("username")
XDocument.DOM.selectSingleNode("//my:txtUser").text = ab
End Sub
ab holds the username of the user opening the form.
this works, but then it goes wrong.
On form number 6 this code stops at the last line where field txtUser is set
to the value from ab.
If I leave this event out completely, the form errors on the next line where
I use the Xdocument.DOM.SelectSingleNode method.
How is this possible. it works in all the other forms, the fields are
existing.
pls. help, I'm really stuck.
rg,
Eric