Change the parent document of a response document

Does anyone know how to change the parent document of a response document. Please HELP

Subject: Change the parent document of a response document

This is code I run in an agent (could be querysave) which updates a Parent doc when Response is saved.You can use the document UNID as the key


’ PURPOSE: Updates Staff version of Student Docs (Parent Doc) when a Student changes their profile (Response doc)

' get the current document key (NotesName)

' go out to the view and walk the documents

' change the status to newMode

Dim doc As NotesDocument

Dim db As NotesDatabase

Dim view As NotesView

Dim docBackend As NotesDocument

Dim uidoc As notesuidocument

Dim thisKey As String

Dim thisNewKey As String' 



Dim ws As New NotesUIWorkspace

Set uidoc = ws.currentdocument

Set doc = uidoc.document

Dim session As New NotesSession

Dim entry As NotesViewEntry

Dim vc As NotesViewEntryCollection	



Set db = session.CurrentDatabase



thisKey = doc.NotesName(0)	



Set view = db.GetView( "vLuSS" )	

Set vc = view.GetAllEntriesByKey( thisKey )



Set entry = vc.GetFirstEntry()

If entry Is Nothing Then 

	

	Exit Sub

Else

	Do While True

		Set docBackend = entry.Document

		

		docBackend.Parent= doc.Parent(0)

		docBackend.HomeAddress = doc.HomeAddress(0)

		docBackend.City= doc.City(0)

		docBackend.State= doc.State(0)

		docBackend.Zip= doc.Zip(0)

		docBackend.PhoneNumber = doc.PhoneNumber(0)

		docBackend.HMailAddress= doc.MailAddress(0)

		docBackend.Industry = doc.Industry(0)

		docBackend.Interest = doc.Interest(0)

		docBackend.Ability = doc.Ability(0)			

		docBackend.Characteristics= doc.Characteristics(0)

		docBackend.Skills = doc.Skills(0)

		docBackend.JLocation= doc.JLocation(0)

		

		Call docBackend.Save(True, True)			

		Set entry = vc.GetNextEntry( entry )

		If entry Is Nothing Then 

			

			Exit Sub

		End If

		

	Loop

End If

Subject: Or for a non-programatic way, Cut the response, highlight the doc you want it to be a response to and Paste

Subject: response.MakeResponse(parent) (WAS: Change the parent document of a response document)