- 论坛徽章:
- 0
|
用一个对话对表单插入记录.得到错误:Subscript out of range.请问下面的代码那里有错.谢谢!
Dim workspace As New NotesUIWorkspace
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Dim box As String
Dim details As String
Dim index As Integer
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
box = "AddTestMethod"
Print box
If Not(workspace.CurrentDocument.EditMode) Then workspace.CurrentDocument.EditMode = True
'Clear the dialog box fields
Call ClearFields(doc)
If workspace.DialogBox(box, True, True, False, False, False, False, box) Then
Print "Refresh"
doc.Action = "Add"
'Set the array size
If doc.num_1(0) = "" Then
index = Ubound(doc.num_1)
Else
index = Ubound(doc.num_1) + 1
End If
If doc.tmpDelta_1(0) = "" Then
Msgbox "Test item requires input value.", 0 + 16, "No record added"
Call ClearFields(doc)
Exit Sub
End If
If doc.tmpHue_1(0) = "" Then
Msgbox "Referenced Standard requires input value.", 0 + 16, "No record added"
Call ClearFields(doc)
Exit Sub
End If
'Add the Summary Fields for check details
Call SummaryFields(doc, index)
Call uidoc.reload
Call uidoc.Refresh
Else 'User pressed Cancel button from the Add Check Item dialog box
Print "No Refresh"
'Clear the dialog box fields
Call ClearFields(doc)
Call uidoc.reload
Call uidoc.Refresh
End If |
|