Using a NotesDocumentCollection With a Prompt

I am trying to use a prompt to bring in muliple selections to populate and array or sting list… My problem is that the only way I can see so far to do this is to use a NDC in a prompt… But it doesn’t seem like it wants to work… It produces no errors but also doesn’t do anything… here is my code…

Public Function GetQuestions(Area As String) As String

Dim Session As New NotesSession 

Dim workspace As New NotesUIWorkspace

Dim response As Variant

Dim db As NotesDatabase

Dim dc As NotesDocumentCollection

Dim doc As NotesDocument

Set db = session.CurrentDatabase   'link to current database

Set view = db.GetView("(Question List)")

Dim vc As NotesViewColumn

Set vc = view.Columns(0)

vc.IsResortAscending = True 

View.Refresh

searchFormula = "Form = ""(Questions)"" & @Contains(AreasPertaining;""" & Area & """)"

Set dc = db.Search( searchFormula, Nothing, 0 )

If dc.count = 0 Then

	Messagebox "No Documents Found within range.", 0 + 16, "Alert"

	Exit Function

End If	

response = workspace.Prompt (PROMPT_OKCANCELLISTMULT, _

"Select Questions", _

"Select Questions.", _

dc.GetFirstDocument , dc)

If Isempty (response) Then

	Messagebox "User canceled", , "Database not opened"

Else

	Messagebox response, , "Open Database"

End If

Set db=Nothing

TheEnd:

End Function

Subject: Using a NotesDocumentCollection With a Prompt

You cannot pass a document or a collection to a PROMPT. Pass it a string or string list. You probably want to build the list in a loop first.

notesUIWorkspace.Prompt( type%, title$, prompt$ [, default ] [, values ] )

e.g.

listOfNames(0) = “Joe”

listOfNames(1) = “Mike”

…

response = workspace.Prompt (PROMPT_OKCANCELLISTMULT, _

“Select Questions”, _

“Select Questions.”, _

dc.GetFirstDocument.Requestor(0) , _

listOfNames )