testhalberr habe ich den Agenten direkt im Queryclose eingefügt
dabei kommt jetzt:
Error #91 Object Variable not set in line 20
Line 20: parent.Status = respdoc.Status
Langsam macht mir das Entwicklen keinen Spaß mehr

Fast Kompletter Code:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim agent As NotesAgent
Dim respdoc As NotesDocument
Dim parent As NotesDocument
Set db = session.CurrentDatabase
Set agent = session.CurrentAgent
' Set respdoc = db.GetDocumentByID(agent.ParameterDocID) ' wenn über Agent ausgeführt
'Set respdoc = db.GetDocumentByUNid(Source.Document.UniversalID)
Set parent = db.GetDocumentByID(Source.Document.ParentDocumentUNID)