currentDoc の DueDate アイテムには「10/16/95」が含まれ、Description アイテムには「Ad Campaign for Acme」が含まれます。したがって次のようになります。
currentDoc.ColumnValues(0) equals 10/16/95
currentDoc.ColumnValues(1) equals _
"New Project: Ad Campaign for Acme"
server$ = "Tilburg"
dbfile$ = "inventor.nsf"
counter% = 1
Dim db As New NotesDatabase( server$, dbfile$ )
Dim view As NotesView
Dim doc As NotesDocument
Dim productList( 1 To 100 ) As Variant
Dim currentProduct As Variant
Set view = db.GetView( "Products" )
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
' Get the value on the current document that shows up in
' view's first column
' Append this value to our productList array
currentProduct = doc.ColumnValues( 0 )
productList( counter% ) = currentProduct
Set doc = view.GetNextDocument( doc )
counter% = counter% + 1
Wend
' There are now counter% - 1 items in the productList
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim i As Integer
Dim j As Integer
Set db = session.CurrentDatabase
Set view= db.GetView("Status")
Set doc = view.GetFirstDocument
Forall value In doc.ColumnValues
' if scalar
If Datatype(value) < 8704 Then
Msgbox value,, "Column "& i
' if multiple values
Else
j = 0
Forall subvalue In value
Msgbox subvalue,, "Column "& i & ", value " & j
j = j + 1
End Forall
End If
i = i + 1
End Forall
End Sub