Versuch's doch mal mit
key = doc.GetItemValue(konvert_z1)
Christoph
Hallo dani_blues,
Du brauchst eine Objektvariable für dein aktuelles Dokument und eine für das zu beschreibende.
Das aktuelle holst Du Dir über den NotesUIWorkpace (erst ein UIDoc setzen und davon das Document ableiten)
Dann setzt Du in eine Variable x den Wert aus dem aktuellen Dokument.
Und benutzt diesen Wert bei der Suche.
Sub Click(Source As Button)
Dim ws as New NotesUIWorkspace 'ZUSATZ
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim uidoc as NotesUIDocument 'ZUSATZ
Dim currDoc as NotesDocument 'ZUSATZ
Set uidoc = ws.CurrentDocument
Set CurrDoc = uidoc.Document
key = currDoc.GetItemValue("konvert_z1")(0) 'Um genau das Feldelement zu bekommen Achso, war ein Edit
Set db = session.CurrentDatabase
Set view = db.GetView ("VorbelegtealterView" )
Set doc = view.GetDocumentByKey (key, true )'Beachte bei GetDocumentByKey exakte Treffer
If Not (doc Is Nothing) Then
Messagebox "$" & doc.GetItemValue ("alter")(0),, _
"alter"
Else
Messagebox "VorbelegtealterView " + key,, "Not found"
End If
End Sub
mfg
Kjeld