Thanks for the reply.
my question is this.
I have set tab index to all the controls (just the way you described)
I need to move focus to a dropdown list programmatically, but this code does not work.
IXMLDOMNode field;
field = thisXDocument.DOM.selectSingleNode("/my:myFields/my:field3");
thisXDocument.View.SelectText(field, Type.Missing);
to move focus programmatically, you need to host the dropdown list in an optional section as explained here at
http://www.infopathdev.com/blogs/matt/archive/2006/01/11/Programmatically-Move-Focus-to-Lists_2C00_-Check-Boxes_2C00_-and-Radio-Buttons-without-Allowing-Deletion.aspx
when i host my dropdown list in the optional section, the tab order gets disturbed in that,if the tab order is as specified below and you press tab key at dropdownlist, the focus doesnot move to field 4 but moves to field1.
field1 : tabindex = 1
field2 : tabindex = 2
dropdownlist tabindex = 3
field4 : tabindex = 4
Please let me know, if there is a workaround.
Thanks,
SaiKrishna