Hi folks,I want to get all the documents in a view by an ID which I am using as a key. This ID is in the current document. Basically then when I loop through the views I want a certain columns values and add them all together and then populate the field with the result. The problem is that “dc” in the following code is not getting populated with anything. Is my key right??? What is the problem??? Any help is appreciated, thanks…
Dim dcDoc As NotesDocument
Dim v As NotesView
Dim dc As NotesDocumentCollection
Set v = db.getview("Approved")
Set dc = v.GetallDocumentsByKey(doc.ID(0), True)
Set dcDoc = dc.GetFirstDocument
nleave = 0
For x = 1 To dc.count
nleave = nleave + dcDoc.ReqWDays_N
Set doc = dc.GetNextDocument (doc)
Next x