In the Initialize event of a view, I ask the user for some data (they have to choose from a predefined list, they can only select one item). I then incorporate that data into a selection formula for the view (view.SelectionFormula = formula). I put in a messagebox that displays the newly created formula and it looks fine.
To test further, in QueryOpen and PostOpen, I put in messageboxes that display the value for the view’s selection formula -
Dim view As NotesView
Dim formula As String
Set view = source.View
formula = view.SelectionFormula
Messagebox("Selection Formula is *" + formula + "*")
This isn’t selecting the appropriate documents. If I hard code the selection formula (using a sample entry that the user might select), the view works fine.
What am I doing wrong? Can this be done?
Thanks!