By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
responses documents at all levels from the parent document.
This code getting the value of NPR_number in the parent or current document and
update all responses and responses to responses of parent and all response
documents with this value.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim nprnumber As String
Set uidoc = workspace.CurrentDocument
nprnumber = uidoc.fieldgettext("NPR_Number")
Set doc = uidoc.Document
Call updateresponses(doc, nprnumber)
Sub updateresponses(doc As NotesDocument, number As String)
Dim collection As NotesDocumentCollection
Dim currentResponse As NotesDocument
Set collection = doc.Responses
Set currentResponse = collection.GetFirstDocument
While Not ( currentResponse Is Nothing )
Call updateresponses(currentResponse, number)
Set currentResponse = collection.GetNextDocument(currentResponse)