QueryOpen in View

Hello folks,

I want to open documents of a view , when i click to open, it has to prompt to whether the data has to open from FORM A or FORM B. If user selects FORM A, the data has to open in FORM A or if Selected FORM B, the data has to open in FORM B.

FORM A and FORM B has same fields but differ in back ground colour.

How this can done??? If any know, please let me know (Please paste code)

Thanks in Advance

VJ

Subject: QueryOpen in View

Use Queryopendocument event, for example:

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)

Dim w As New NotesUIWorkspace

Dim docs As NotesDocumentCollection

Dim doc As NotesDocument

Set docs = Source.Documents

Set doc = docs.GetFirstDocument



Continue = False



doc.Form = "FormA"

' or

doc.Form = "FormB"



Call w.EditDocument(False, doc)

End Sub

Konrad

Subject: RE: QueryOpen in View

Thanks a lot Konrad, It works fine.

Is there any way to prompt the user to select FORM A or FORM B?

Depending upon the selection by user, the data has to open in that form.

Thanks

VJ

Subject: RE: QueryOpen in View

Use Prompt method:

Dim response As Variant

Dim values(1) As Variant

values(0) = “FormA”

values(1) = “FormB”

response = w.Prompt (PROMPT_OKCANCELLIST, _

“Select”, “Select”, values(0), values)

Konrad

Subject: RE: QueryOpen in View

fantabulous Konrad,… you made my job easy.

Thanks a lot again

VJ