I have been having problems trying to set the XPathNavigator in InfoPath form. If I change the textbox from a date data type to a string data type, it works. How can I convert or cast the XPathNaigator in InfoPath? Here is what I have.
Dim xnMyForm as XPathnavigator = Me.CreateNavigator
Dim ns as XmlNamespaceManager = Me.NamespaceManager
dClassDate = getFriDate() ' getFriDate() gets the date of the upcoming Friday. If today is Tuesday, it will return the date of Friday as #4/18/2008#
'Here is where I get the error.
xnMyForm.SelectSingleNode("/my:SharePointTraining/my:ClassDate", ns).SetValue(dClassDate)
'If I change the date Picker, ClassDate, on the form to a string data type, it works.
Any suggestions on how to make this work?
TIA
Mike