Sub Initialize
'Visit all main documents to get values
'Verify values on response document to main and update if they are different
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim parentDoc As NotesDocument
Dim responseDoc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView( "View Name" )
Set parentDoc = view.GetFirstDocument
'START: Visit each main document in the view
While Not ( parentDoc Is Nothing )
'START - Get values of main doc
v1=parentdoc.field1(0)
v2=parentdoc.field2(0)
v3=parentdoc.field3(0)
' and so on with all fields you wish to update
'END - Get values of main doc
'START: Visit each of the parent's response documents
Set responseDoc = view.GetChild( parentDoc )
While Not (ResponseDoc Is Nothing )
'START - Get values of resp doc
If v1<>ResponseDoc.field10) Then
ResponseDoc.field1=v1
End If
If v2<>ResponseDoc.field2(0) Then
ResponseDoc.field2=v2
End If
If v3<>ResponseDoc.field3(0) Then
ResponseDoc.field3=v3
End If
' and so on for all your response do fields
'END - Get values of resp doc
Call ResponseDoc.ComputeWithForm( False, False )
Call ResponseDoc.Save( True, True )
Set responseDoc = view.GetNextSibling( responseDoc )
Wend
Set parentDoc = view.GetNextSibling( parentDoc )
Wend
'END: Visit each main document in the view
End Sub
[\Code]
Hope this helps