Help with Error in Forms Code!!! - InfoPath Dev
in

InfoPath Dev

Help with Error in Forms Code!!!

Last post 04-14-2008 06:06 AM by Bill . 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-14-2008 04:40 AM

    • Bill
    • Top 200 Contributor
      Male
    • Joined on 09-26-2006
    • USA
    • Posts 57

    Help with Error in Forms Code!!!

    Good Morning:

    I am hoping that someone can point me in the right direction in what to look for or how to solve.  I have an Infopath solution that everytime I open the publish form I receive the following error:

     InfoPath cannot open the selected form because of an error in the form's code. Attempt to modify a read only node.

    This error started appearing after I added a couple of tables to my solution and a few Master/Detail sections to my existing form.

    Any help would be greatly appreciated!!!!!!!

    Thanks!

    Bill

     

    William L Fringer
    Database Administrator/Systems Integration Specialists

    L & S Associates, Inc.
    Michigan State University Corporate Research Park

    1-800-766-6185, ext 2076
  • 04-14-2008 05:25 AM In reply to

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    Re: Help with Error in Forms Code!!!

    Hi, just some ideas:

    • Is there an OnLoad event and what code are you executing? Maybe some code that actually uses the view (like 'thisXDocument.View.ExecuteAction("xCollection::insert", "group1_1");' ?
    • Are you using any rules or other events that could trigger code execution when opening the form?
    • Are you using digital signatures?

    Albert

     

  • 04-14-2008 06:06 AM In reply to

    • Bill
    • Top 200 Contributor
      Male
    • Joined on 09-26-2006
    • USA
    • Posts 57

    Re: Help with Error in Forms Code!!!

    ON do have an upload event and I have reviewed all of the objects that are updated and mad sure that they were not set to read only:  See Code Below...Did I or am I missing something:  I am looking into any rules or other events that could trigger code execution when opening the form but so far I am not finding anything.

     

    Dim i, hold, contsupref As String

    Dim var As String

    Dim strOut, txtXMLIn, xmlOut, frmFileLocation, frmFileName, frmFileSaveAs As String

    Dim GMUI As GoldMine.UI

    Dim doc, xmldoc, docReturned As MSXML2.DOMDocument40

    Dim elRoot As MSXML.IXMLDOMElement

    Dim Child As MSXML.IXMLDOMElement

    Dim timer As System.Timers.Timer

    'Assign Accountno to the interview

    If Left(thisXDocument.URI.ToString, 4) = "Form" Then

    'Pull data from GM to use for saving document

    var = "AccountNo"

    i = GetAccntVal(var)

    thisXDocument.DOM.selectSingleNode("/dfs:myFields/my:AccountNoKey").text = i

    var = "RecID"

    i = GetAccntVal(var)

    thisXDocument.DOM.selectSingleNode("/dfs:myFields/my:CandI/my:RecID").text = i

    var = "Contact"

    i = GetAccntVal(var)

    thisXDocument.DOM.selectSingleNode("/dfs:myFields/my:CandI/my:Contact").text = i

    var = "&UserName"

    i = GetAccntVal(var)

    thisXDocument.DOM.selectSingleNode("/dfs:myFields/my:CandI/my:FullUserName").text = i

    End If

    If Left(thisXDocument.URI.ToString(), 4) <> "Form" Then

    frmChangeTextFlag = False

    'MsgBox("I made it to the query")

    Dim chkvalue, passsql As String

    chkvalue = " "

    chkvalue = "contsupref"

    passsql = "SELECT " & chkvalue & " FROM CONTSUPP" & " Where RecID = " & "'" & thisXDocument.DOM.selectSingleNode("/dfs:myFields/my:CONSUPPREF").text & "'"

    FldRunQry(chkvalue, passsql)

    'MsgBox(frmContSupRef)

    'Check to see if document should be set to read only

    If frmContSupRef = "MA App FILED" Then

    thisXDocument.DOM.selectSingleNode("/dfs:myFields/my:ApplicationType").text = "MA App FILED"

    thisXDocument.Save()

    End If

    End If

    thisXDocument.DOM.selectSingleNode("/dfs:myFields/my:EditFlag").text = "FALSE"

     

     

    William L Fringer
    Database Administrator/Systems Integration Specialists

    L & S Associates, Inc.
    Michigan State University Corporate Research Park

    1-800-766-6185, ext 2076
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.