Object Required xdocument.dom.selectsingle node error - InfoPath Dev
in

InfoPath Dev

Object Required xdocument.dom.selectsingle node error

Last post 06-05-2008 05:40 PM by rbowles. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-05-2008 12:48 PM

    Object Required xdocument.dom.selectsingle node error

    I copied the logic in a date calcualtion routine i found on the net.  I substittuded my datasource variables for the one in the sample and I keep getting the above error.  I am doing it in vbscript.

    Here is my code

    Sub CalculateDateDifference()
    Dim strStartDate
    Dim strEndDate
    Dim strDateInterval
    Dim dtStart
    Dim dtEnd
    Dim intDateDiff
    'Retrieve the ISO date from the InfoPath date fields
    strStartDate = XDocument.DOM.selectSingleNode _
    ("/dfs:queryFields/q:CashApp/@DISC_DATE").text
    strEndDate = XDocument.DOM.selectSingleNode _
    ("/dfs:queryFields/q:TOTALS/@PAY_DATE").text

    The code I copied it from is exactly the same except for the parts in the quotes. 

     

    Any ideas?

    Thanks,

    Randy

  • 06-05-2008 05:40 PM In reply to

    Re: Object Required xdocument.dom.selectsingle node error

    I figured it out.  My path was wrong.  Once I corrected my path it worked.  However the data calcuation only works on the first record.  Any ideas on how to get it to work on them all.  I put the code so it executes on each record but it still only gets the first record.

     

    Any Ideas?

     

    Thanks

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