Data from dialogbox

Hi all,

I have this agent. I have problem because I dont read data from dialog box - FirstName_1 + LastName_1. Where I have mistake?

Dim sess As New NotesSession

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim DialogDoc As NotesDocument

Dim PersonDoc As NotesDocument

Dim CurDB As NotesDatabase

Dim coll As NotesDocumentCollection

Dim datum As New NotesDateTime( “01/01/90” )

Set CurDB = sess.CurrentDatabase

Set uidoc = workspace.CurrentDocument

Set DialogDoc = CurDB.CreateDocument

flag = workspace.DialogBox (“dlgNEWPERSON”, True, True, False, True, False, False, "Nová osoba ", DialogDoc, True)

Call DialogDoc.Save (False, False)

sf1$=“form=”+Chr(34)+“frmPerson”+Chr(34)

sf2$=“FirstName=”+Chr(34)+ DialogDoc.FirstName_1(0) +Chr(34)

sf3$=“LastName=”+Chr(34)+ DialogDoc.LastName_1(0) +Chr(34)

If flag = False Then Exit Sub

sf$ = sf1$ + “&” + sf2$ + “&” + sf3$

Set coll= CurDB.search(sf$, datum, 0)

Subject: data from dialogbox

I think your options are wrong. Also, check to see whether the user has clicked OK or not - and do you really need to save the dialog form?

If workspace.dialogbox(“dlgNEWPERSON”, True, True, False, False, False, False, "Nová osoba ", DialogDoc, True) then

…use your fields - no need to save if you don’t want to…

Else

…user has cancelled…

End If

Subject: RE: data from dialogbox

Thank you Dan,

I know that the Save is excessive, but your adjustment unhelp