Hi Bob,
You need to access your secondary data source (used to fill your drop-down).
Here is C# code to access it (you will need to adapt to VB):
IXMLDOMDocument3 oSecondDoc =
(IXMLDOMDocument3)thisXDocument.DataObjects["tblTest"].DOM;
oSecondDoc.setProperty("SelectionNamespaces",
"xmlns:dfs=\"
http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\"
xmlns:d=\"
http://schemas.microsoft.com/office/infopath/2003/ado/dataFields\"");
IXMLDOMNode oSecDocNode =
oSecondDoc.selectSingleNode("/dfs:myFields/dfs:dataFields");
to get to fldTest in that doc:
foreach (IXMLDOMNode oN in oSecDocNode.childNodes)
{
if (oN.nodeType == DOMNodeType.NODE_ELEMENT)
{
IXMLDOMNode oField1 = oN.selectSingleNode("@fldTest");
}
}
Hope that it gets you started....
Regards,
Franck Dauché
:
I've filled a drop-down list box with a data connection and I want to access
those items in the list using vb.net managed code so I can assign the last
item in the list to a variable, any suggestion on how I can achieve this?
Thanks!
Bob