Hello All,
I'm stumped and could really use another set of eyes. The code in between ***** below builds an array (mArray) that includes the document counts for the categories in the gArray. Both arrays are populating just fine. When all is said and done, I want to copy the values of these arrays to a field in a form.
The problem is that my mArray loop keeps going and the debugger flags the <<<<<<< line of code below >>>>>>>> as "object variable not set" even though my view collection is "nothing". When I debug the script the VC variable has been reset and is blank.
I'm new at creating code that loops through a document collection to build arrays and then do stuff with that information. I'm sure it's something simple, but for the life of me, I don't know how to get past it.
Thanks in advance for your assistance
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim viewTotal As NotesView
Dim vc As NotesViewEntryCollection
DimVCTotal As NotesViewEntryCollection
Dim report As Notes Document
Dim dt As New NotesDateTime("")
Set db = s.CurrentDatabase
Set report = db.CreateDocument
report.Form = "Monthly Report NEW"
Dim mArray() As String
Dim gArray() As String
'get view
Set view = db.GetView("view")
'create view navigator
Dim vNav As NotesViewNavitagor
Set vNav = view.CreateViewNav
'get first entry of navigator
Dim vEntry As NotesViewEntry
Set vEntry = vNav.GetFirst
'get all categories in the view navigator
'Do Until vEntry Is Nothing
ReDim Preserve gArray(count)
gArray(count) = vEntry.ColumnValues(0)
count = count + 1
Set vEntry = vNav.GetNextCategory(vEntry)
Loop
'use the size of the gArray to redimension the mArray to hold doc counts
Redim mArray(count - 1)
'reset count variable to use below
count = 0
'**********
'get number of docs for each team
Forall team In gArray
'get view entry collection for each team
Set vc = view.GetAllEntriesByKey(team)
'set initial count to collection count
<<<<<<<<<<<< mArray(count) = vc.Count >>>>>>>>>>>>>>
Do Until vEntry is Nothing
Set vEntry = vc.GetFirstEntry()
Set vEntry = vc.GetNextEntry(vEntry)
Loop
count = count + 1
End Forall
'**********
'add results to monthly report
......
End Sub

Do Until Loop using NotesViewEntryC... (Carla C. Porter... 6.Dec.05)
. . 