I
iosif88
Помогите разобраться.
При сохранении документа выдается сообщение "Object variable not set " и номер (поле RequestNo ) не создается.
Я сам в Лотусе новичок, код скопирован из книги в мое приложение.
В чем ошибка?
При сохранении документа выдается сообщение "Object variable not set " и номер (поле RequestNo ) не создается.
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim s As New NotesSession
Dim w As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim numView As NotesView
Set w = New NotesUIWorkspace
Set db = s.CurrentDatabase
Set s = New NotesSession
Set uidoc = w.CurrentDocument
Set doc = uidoc.Document
Continue = CheckFieldValues ( doc )
If Continue Then
If doc.RequestNo(0) = "" Then
Dim view As NotesView
Dim DocRef As NotesDocument
Set numView = db.GetView ("(RequestNo)")
Set DocRef = numView.GetFirstDocument
If (DocRef Is Nothing) Then
doc.RequestNo = 1000
Else
doc.RequestNo = DocRef.RequestNo(0) + 1
End If
End If
End If
End Sub
Я сам в Лотусе новичок, код скопирован из книги в мое приложение.
В чем ошибка?