Hello,
I am having a similar issue when attempting to set the focus to a check box: I run this code (written in VB) in an afterUpdate event:
Dim objectField1 = e.Xdocument.DOM.selectsingleNode("/dfs:myFields/dfs:datafields/d:AForm49B/@Gender")
e.xDocument.View.SelectText(objField1, Type.Missing)
and I receive this error:
The specified values for the View.SelectText call are not valid.
at Microsoft.Office.Interop.InfoPath.SemiTrust.View.SelectText(IXMLDOMNode pxnField, Object varViewContext)
at Microsoft.Office.Interop.InfoPath.SemiTrust.ViewObjectWrapper.SelectText(IXMLDOMNode pxnField, Object varViewContext)
at DHS49B.DHS49B.CTRL7_OnClick(DocActionEvent e) in E:\goldmine\GMForms\DHS49Forms\DHS49Forms\DHS49B\DHS49B\FormCode.vb:line 752
at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
Can anyone tell me what I am doing wrong?
Thanks!
Bill
William L Fringer
Database Administrator/Systems Integration Specialists
L & S Associates, Inc.
Michigan State University Corporate Research Park
1-800-766-6185, ext 2076