Hi, I have problem with following LS. I used method getnextdocument. From time to time an error occures and all LS is interrupted (I marked row with ***). (I guess that it is when there is no other entry in navigator which is document) Is there any easy way how in case of error LS can run further just entry is nothing and loop will be normally finished?)thank you, jakub
While Not entry Is Nothing
Set doc = entry.Document
Set prevodpol = New NotesDateTime(doc.VDatum(0))
Call prevodpol.SetAnyTime 'dodatek
If (prevodpol.TimeDifference(prevodod) => 0) And (prevodpol.TimeDifference(prevoddo) <= 0) And (doc.VNazevZak(0) = zakjmeno) Then
doc.VDavka = cislodavky
Call doc.Save(True,False)
ulozdavku = True
End If
Subject: GetNextDocument error - how to prevent it
there have been hundreds of posting in this forum about problems when working with collections. Basically, if you are updating a document inside the collection, then you need to keep a placeholder BEFORE you make the change, something like this …Dim placeholder as NotesViewEntry
Subject: RE: GetNextDocument error - how to prevent it
When you post about an error you’re having, it really helps to post the actual error message you’re getting. See link below for more hints about how to get good answers.
In your case, it seems you probably need to set the NotesView.AutoUpdate property False.