Catastrophic error. Please Help Me!!!! - InfoPath Dev
in

InfoPath Dev

Catastrophic error. Please Help Me!!!!

Last post 04-04-2008 08:34 PM by Clay Fox. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-04-2008 12:53 PM

    Catastrophic error. Please Help Me!!!!

    hey everyone i am still very new to this and I have an infopath form created with the tools for office.  and the submit button has the following code

    im xpath As String = "/my:group1/my:group2/my:ExpenseDetails"

    Dim oNodeList As IXMLDOMNodeList

    Dim oNode As IXMLDOMNode

    Dim oField As IXMLDOMNode

    Dim txtID = thisXDocument.DOM.selectSingleNode("/my:txtID")

    Dim txtexpdate = thisXDocument.DOM.selectSingleNode("/my:txtexpdate")

    Dim txtOrgadd = thisXDocument.DOM.selectSingleNode("/my:txtOrgadd")

    Dim txtOrgmun = thisXDocument.DOM.selectSingleNode("/my:txtOrgmun")

    Dim txtDesadd = thisXDocument.DOM.selectSingleNode("/my:txtDesadd")

    Dim txtDesmun = thisXDocument.DOM.selectSingleNode("/my:txtDesmun")

    Dim txtPurpose = thisXDocument.DOM.selectSingleNode("/my:txtPurpose")

    Dim txtKM = thisXDocument.DOM.selectSingleNode("/my:txtKM")

    Dim txtNMdesc = thisXDocument.DOM.selectSingleNode("/my:txtNMdesc")

    Dim txtExpamt = thisXDocument.DOM.selectSingleNode("/my:txtExpamt")

    Dim txtRegKM = thisXDocument.DOM.selectSingleNode("/my:txtRegKM")

    Dim txtKMrateReg = thisXDocument.DOM.selectSingleNode("/my:txtKMrateReg")

    Dim txtKMrateXS = thisXDocument.DOM.selectSingleNode("/my:txtKMrateXS")Dim txtMilCalc = thisXDocument.DOM.selectSingleNode("/my:txtMilCalc")

    oNodeList = thisXDocument.DOM.selectNodes(xpath)

    If (oNodeList.length > 0) Then

    For Each oNode In oNodeList

    If (oNode.nodeType = DOMNodeType.NODE_ELEMENT) Then

    txtID.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:ItemId")

    txtexpdate.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:ExpenseDate")

    txtOrgadd.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:OrigAddress")

    txtOrgmun.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:OrigMuncipality")

    txtDesadd.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:DesAddress")

    txtDesmun.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:DesMunicipality")

    txtPurpose.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:Purpose")

    txtKM.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:KM")

    txtNMdesc.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:NonMileageExp")

    txtExpamt.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:ExpenseAmt")

    txtRegKM.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:RegKM")

    txtKMrateReg.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:KMRateReg")

    txtKMrateXS.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:KMRateExcess")

    txtMilCalc.text = oNode.selectSingleNode("/my:group1/my:group2/my:ExpenseDetails/my:MileageCalc")

    End If

    For Each WebServiceAdp As WebServiceAdapter2 In thisXDocument.DataAdapters

    If WebServiceAdp.Name = "Submit" Then

    WebServiceAdp.Submit()

    End If

    Next

    Next

    End If

     

     

    what is happening is when i press the submit button i get a catastrophic error and it points to this line

    Dim txtID = thisXDocument.DOM.selectSingleNode("/my:txtID")

    saying that thisxdocument caused the error.

     

    whats going on???

     

    thanks in advance

  • 04-04-2008 02:51 PM In reply to

    Re: Catastrophic error. Please Help Me!!!!

    What exactly is this submit doing?

    What are you submitting and where is it going?

    You are probably not defining things properly but it would help to know what you are trying to accomplish.

  • 04-04-2008 03:24 PM In reply to

    Re: Catastrophic error. Please Help Me!!!!

    this is submitting to a webservice.  and from there it is going to a repeating table.

     

    What i am trying to accomplish is to loop through a repeating table and place each item in the repeating table into a series of textboxes then it calls the webservice submits the textboxes and then loops and does the same thing for the other lines in the table.

    Any help would be greatly appreciated.

    Arley

  • 04-04-2008 08:34 PM In reply to

    Re: Catastrophic error. Please Help Me!!!!

    Hi Arley.

    Welcome to the forum.

    So you have repeating data from a secondary source that you want to load into your form and then also export this out to a database?

    I have some forms that do this.  Send me an email if you would like to see how we do it.

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.