Actions after Dialogue box

Help!

I’m running a piece of lotuscript from button on a view. The button launched a Dialogue box containing a form with a number of dialogue lists choices. The selected options chosen are used to create adb.search string, the results added to a colection, then put into a

folder.

However, what I cant get it to do is to alter the view being displayed once the code has run, so that the folder I’ve added the results of the search to is displayed.

I’ve tried db.OpenView to alter the view, with no joy. I’ve also tried adding some script to the queryclose form action of the form I’m using in the dialogue box to change the view, without success.

Heres my code:

Sub Click(Source As Button)

Dim w As New NotesUIWorkspace

Dim uidb As NotesUIDatabase

Dim db As NotesDatabase

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim coll As NotesDocumentCollection

Dim agent As NotesAgent

Dim viewFolder As NotesView

Dim vecFolder As NotesViewEntryCollection

Dim strSearch As String

Dim strIntermediary As String

Dim strAccountManager As String

Dim strSalesChannel As String

Dim strBusinessCentre As String



Set uidoc = w.CurrentDocument

Set uidb = w.CurrentDatabase

Set db = uidb.Database



' Get the contents of each field choice.

strIntermediary = uidoc.FieldGetText("kwdIntermediary")

strAccountManager = uidoc.FieldGetText("kwdAccountManager")

strSalesChannel = uidoc.FieldGetText("kwdSalesChannel")

strBusinessCentre = uidoc.FieldGetText("kwdBusinessCentre")



' Try a simple search first

strSearch = |txtEnquiryIntermediaryName = ("|+strIntermediary+|")|



' First, empty the folder of previous report data

Set viewFolder = db.Getview("fldSearch")



Do While Not doc Is Nothing

	Set doc = viewFolder.getFirstDocument		

	Call doc.remove(True)

Loop



' Get the collection, and put the results in the 'Search' folder

Set coll = db.Search(strSearch, Nothing, 0)	

Call coll.PutAllInFolder("fldSearch", True)

Call uidb.OpenView("fldSearch", ,True)



' Now close the input form

Call uidoc.Close

End Sub

Subject: Actions after Dialogue box

Hello,

Can you try this :

Call uidb.OpenView(“fldSearch”,False,True)

Also, what kind of folder is “fldSearch”?

cheers

Tom

Subject: RE: Actions after Dialogue box

Thanks Tom - that change was unsuccessful. The folder is a private folder.

cheers

Mike