Hi
I use to pass a NotesDocument in parameter of the DialogBox method of NotesUIWorkspace.
1) you create the NotesDocument (called here docGhost)
set docGhost = db.CreateDocument
2) you set the fields (with same names that in your dialogbox form) with default values
docGhost.Field1 = 0
docGhost.Field2 = "Your text value"
3) you call the DialogBox method with specifying docGhost in paramater
4) when you are back from your dialogbox, you can work with the new value of the fields
<pre>
If ws.DialogBox("YourDialogBoxFormNameHere" ,True,True,False,False,False,False,"Your title here", docGhost ) = True Then
If docGhost.Field1(0) = 0 Then
Messagebox "bla bla" , 48 , "Title"
End if
If docGhost.Field2(0) = "Your text value" Then
Messagebox "You did not changed anything !" , 48 , "Title"
End if
end if
</pre>
And if you really can't use the default "Ok/Cancel" button, you could use the DialogBoxCanceled property of the dialogboxform and then set some environment variable in the Notes.ini and use these values later in you primary form (read then with notesSession.GetEnvironmentValue )
<pre>
' In the QueryClose event of your dialogbox form
If not uidoc.DialogBoxCanceled then
Call notesSession.SetEnvironmentVar( "YourDlgField1" , doc.Field1(0) , False )
Call notesSession.SetEnvironmentVar( "YourDlgField2" , doc.Field2(0) , False )
end if
</pre>