Mark P Laguipo 3.Jan.12 12:50 AM a Web browser Domino Designer6.5.3Windows XP
guys can i get some tips or sample code on how to access data in several columns in a single view that is displayed in notes client.
i also got some error in my code. the error says "variant doesn't have any container"
hope you guys can help me with this.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim item As Variant
Dim index As Integer
Set db = session.CurrentDatabase
Set view = db.GetView("All Requests")
Messagebox "View name: " & view.Name
Set doc = view.GetFirstDocument
index = 0
While Not(doc Is Nothing)
'On Error Resume Next
item = doc.ColumnValues(5)'<---right here
If item(index) = Pending Then
Call doc.ReplaceItemValue("Pending", "Approved")
Call doc.Save(False, True)
Messagebox "Pending request Approved"
Call view.GetNextDocument(doc)
Goto inc
Else
inc: index = index +1
End If
Wend
Messagebox "Doc not found"