I have created a search form to perform a full text search in my notes database. the form has a button called "Search" which uses the newsletter object to perform the search.
This is all working very well, however, as this does an entire database search it returns searches from a couple of form which i want excludes out of the search as they are only lookup/profile forms.
Is this possible.
Below is the code behind the search button, is anyone able to review and advise of possiblity of the above?
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim news As NotesNewsletter
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set uidoc = ws.currentdocument
Set doc = uidoc.document
searchFormula$ = doc.BasicSearch(0)
If searchFormula$ = "" Then
REM searchFormula$ = """" & searchFormula$ & """"
REM Call db.UpdateFTIndex(True)
Set dc = db.FTSearch(searchFormula$, 100)
Set news = New NotesNewsletter(dc)
news.DoScore = False
news.DoSubject = True
news.SubjectItemName = "NewsSubject"
Set doc = news.FormatMsgWithDoclinks(db)
doc.subject = "Search Results For: " & searchFormula$
doc.form = "Search"
doc.SaveOptions = "0"
Set uidoc = ws.EditDocument(True, doc)
Where "NewSubject" is the field on each of the forms which has what I want returned on the search result form.
Also, for some reason, when I do the search(by clicking the search button on the search form form) I get all the results that I need, then I click one of the links on the result search screen(search form which has only a subject and a body field), it opens the correct document, when I close that document, I seem to go back to the search screen(search form) instead of the search result screen(search form). Actually to be more precise, when I click on the link to open one of the results document, I seem to lose the result screen from the workspace window tabs and the only one that's remain is the search form with the opened document.
Hope someone has an idea on what could be going wrong with this.
Thank you in advance.