Dim session As NotesSession
Dim db As NotesDatabase
Dim doc_collection As NotesDocumentCollection
Dim form_name As String
Dim timeout As Long
Set session = New NotesSession
Set db = session.CurrentDatabase
Call db.UpdateFTIndex(True)
form_name = "dbacl_manager"
timeout = 5
Sleep timeout
Set doc_collection = db.FTSearch(|FIELD Form CONTAINS | + form_name, 0)
Print "Total number of documents by form " + form_name + " is "+ Cstr(doc_collection.Count) + "."