Dim parentUnid As String
parentUnid = doc.ParentDocumentUNID
If ( parentUnid = "" ) Then
Messagebox( "This document has no parent." )
Else
Messagebox( "The parent's UNID is " + parentUNID )
End If
Dim response As NotesDocument
Dim parent As NotesDocument
'...set value of response...
Set parent = db.GetDocumentByUNID _
( response.ParentDocumentUNID )