grab a document from a database ( shorten your code )
Public Function GetDocFromDb( db As NotesDatabase, viewName As String, key() As Variant, exact As Boolean ) As NotesDocument
‘ returns the first doc based on a search key
‘ posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/D8474BE8C4FEEB35862574EF00628013
‘ written by Mike Mortin
Dim view As NotesView ‘ get the view
Set view = db.GetView(viewName) ‘ get the doc from the key
Set GetDocFromDb = view.GetDocumentByKey(key, exact)
End Function
Original source : http://www.openntf.org/projects/codebin/codebin.ns…