GetNextDocument

Hello There, I don’t know why GetNextDocument, does not show me a nextdocument, When i run this code, it shows me only one and same requestnumber. There are n documents in a view, and n different req number, but i can see only one rquest number, can anyone guide me what wrong here?

Thanks

MS

Sub Initialize

Dim ns As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim doc As NotesDocument

Set db = ns.CurrentDatabase

Set view = db.GetView(“viewname”)

Set doc = view.GetFirstDocument

While Not ( doc Is Nothing )

reqnumber = doc.RequestNumber(0)

Dim j As Integer

j = view.FTSearch( reqnumber, 0 ) If j > 1 Then

   For i = 1 To j-1			 	Msgbox doc.RequestNumber(0)		   Next					 End If	

Wend

Set doc = view.GetNextDocument(doc)

End Sub

Subject: You need to get the next doc WITHIN your loop (WAS: GetNextDocument)

Subject: GetNextDocument

hi,as i see your while statement isnot looping through j, then iw should work i guess

regds

Ozcan