- 论坛徽章:
- 0
|
Sub Click(Source As Button)
Dim ws As NotesUiWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim sess As NotesSession
Dim rep As Integer
Set ws = New NotesUIWorkspace
Set sess = New NotesSession
Set uidoc = ws.currentdocument
Set doc = uidoc.document
uidoc.AutoReload = False
uidoc.EditMode = True
rep = ws.DialogBox( "TrainingRecord",True, True, False, False, _
False, False, "Please input." )
If rep Then
Dim tmp As String
Dim tmpRecords As Variant
Dim tmpType As String
Dim tmpTraining As String
Dim tmpInstructor As String
Dim tmpLicense As String
Dim x As Integer
tmpRecords = doc.Records
tmpType = doc.Type1(0)
tmpTraining = doc.Training1(0)
tmpInstructor = doc.Instructor1(0)
tmpRecords(X) = "* " & tmptraining & " by: " & tmpInstructor & " " & tmpType
If tmpRecords(0) ="" Then
x = 0
Else
x = Ubound(tmpRecords) + 1
End If
Redim Preserve tmpRecords(x)
tmpRecords(x)=doc.Records(0)
doc.Records = tmpRecords
End If
Call doc.RemoveItem("Type1")
Call doc.RemoveItem("Training1")
Call doc.RemoveItem("Instructor1")
Call doc.RemoveItem("Input1")
If doc.Save(False,False) Then
uidoc.AutoReload = True
Call uidoc.Reload
Call uidoc.Refresh
End If
End Sub |
|