Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InfoPath / Access 2003 - VBScript SQL (update query)

Status
Not open for further replies.

Picard012

Programmer
Apr 25, 2008
8
US
Good morning.

I was wondering why I might be getting an error (FROM statement) when I run the following code:

Sub CTRL10_7_OnClick(eventObj)

' Submit Button

Dim strSQL, MyConn

Dim MainAdapter

Set MainAdapter = XDocument.DataAdapters("Main connection")

'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');"

MainAdapter.Command = strSQL

MainAdapter.Query

Thank you,

Picard012

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top