Examples: NotesUIDatabase class

This example tracks the number of document deletions that occur while a database is open.

(Declarations)
Dim deleteCount As Integer
Sub Postopen(Source As Notesuidatabase)
  deleteCount = 0
End Sub
Sub Querydocumentdelete(Source As Notesuidatabase, _
Continue As Variant)
  If Continue Then
    deleteCount = deleteCount + Source.Documents.Count
  End If
End Sub
Sub Querydocumentundelete(Source As Notesuidatabase, _
Continue As Variant)
  If Continue Then
    deleteCount = deleteCount - Source.Documents.Count
  End If
End Sub
Sub Postdocumentdelete(Source As Notesuidatabase)
  Messagebox Source.Documents.Count _
  & " deleted or marked for deletion"
End Sub
Sub Queryclose(Source As Notesuidatabase, Continue As Variant)
  Messagebox deleteCount & " documents deleted",, _
  "Net deletions"
End Sub