The "insert item" code on a repeating is as listed below;
I have disabled this option from the repeat1ng table and added a button, then applied the same code to the button and it fails.
I get a runtime error:
The following error occurred:
Object required: 'thisXDocument'
File:script.vbs
Line:21
Why? what am I missing?
***************************************************************
Sub CTRL8_5_OnClick(eventObj)
' get a reference to the node the repeating table is bound to
IXMLDOMNode row = thisXDocument.DOM.selectSingleNode("//my:repeatingtable1")
' make a copy of the node by cloning it
row = row.cloneNode(true)
' set the new values of the row#%92s fields
row.selectSingleNode("my:field1").text = "new row field 1"
row.selectSingleNode("my:field2").text = "new row field 2"
row.selectSingleNode("my:field3").text = "new row field 3"
' append the cloned row to the parent node
IXMLDOMNode parent = thisXDocument.DOM.selectSingleNode("/my:myFields")
parent.appendChild(row)
End Sub
*************************************************************
Kip Bautista
KTB Dezines
[email protected]