InfoPath - Access 2003 - VBScript - SQL - InfoPath Dev
in

InfoPath Dev

InfoPath - Access 2003 - VBScript - SQL

Last post 04-17-2009 08:03 AM by Wheels. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-17-2009 08:03 AM

    InfoPath - Access 2003 - VBScript - SQL

    Good morning all.

    I have the following code, but I am coming up with an error in my FROM statement.

    Sub CTRL10_7_OnClick(eventObj)
    ' Submit Button
    Dim strSQL, MyConn
    ' Submit the form to add the new record
    Set MyConn = CreateObject("ADODB.Connection")
    MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\c9dpr\Desktop\GC100 Backend.mdb"
    StoreFields
    XDocument.UI.Alert(Lockbox)
    'SQL statement to run apend query
    strSQL = ""
    strSQL = strSQL & "INSERT INTO tbl_GC100 (Lockbox, [Cash Deposit Date], [Batch Number])"
    strSQL = strSQL & " SELECT @Lockbox, @Cash_Deposit_Date, @Batch_Number"
    strSQL = strSQL & " FROM XDocument.DOM.selectSingleNode('dfs:myFields/dfs:dataFields/d:tbl_GC100')"
    XDocument.UI.Alert(strSQL)

    MyConn.Execute strSQL
    MyConn.Close

    End Sub

    Any assistance would be greatly appreciated.

     Thank you, WHEELS

     

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