Dankeschön!
Wenn ich nun diesen Code hinter eine Schaltfläche zum testen lege, erscheint erst der Fehler: Object variable not set
danach: Invalid key value type.
Hängt es wohl mit key = konvert_z1 zusammen?
konvert_z1 ist ein Feld.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
key = konvert_z1
Set db = session.CurrentDatabase
Set view = db.GetView ("VorbelegteAlterView" )
Set doc = view.GetDocumentByKey (key )
If Not (doc Is Nothing) Then
Messagebox "$" & doc.GetItemValue ("Alter")(0),, _
"Alter"
Else
Messagebox "VorbelegteAlterView " + key,, "Not found"
End If
End Sub
W
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
key = konvert_z1
Set db = session.CurrentDatabase
Set view = db.GetView ("VorbelegteAlterView" )
Set doc = view.GetDocumentByKey (key )
If Not (doc Is Nothing) Then
Messagebox "$" & doc.GetItemValue ("Alter")(0),, _
"Alter"
Else
Messagebox "VorbelegteAlterView " + key,, "Not found"
End If
End Sub