How to set focus to a specific control - InfoPath Dev
in

InfoPath Dev

How to set focus to a specific control

Last post 07-04-2007 11:59 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-29-2007 03:23 PM

    How to set focus to a specific control

    I have done some research and found the following code can be used to set focus to a control that is bound to a data source.

     

    Private Sub SetFieldFocus(ByVal xpath As String)

         Dim textNode As XPathNavigator = CreateNavigator().SelectSingleNode(xpath, NamespaceManager)

     

         CurrentView.SelectText(textNode)

    End Sub

     

    I tested it and it works; however it will not work if I set the form to be “Browser Compatibility”.

     

    The message I get is:  'SelectText' is not a member of 'Microsoft.Office.InfoPath.View'

     

    I am coding in VB and using InfoPath 2007 and SharePoint MOSS 2007.

     

    Dose anyone know how I can set focus to a control that is bound to a data source in a browser compatible form?

     

    Thank you,

    Steve

  • 07-04-2007 11:59 AM In reply to

    Re: How to set focus to a specific control

    Unfortunately, I have never heard of someone figuring this out.  If you do, please let us know!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.