I have two forms say form1 and form2(form1 belong 1.nsf database and form2 belongs to 2.nsf).In form1 we have 100 employees. suppose i am accessing employee number 10 and going to form2 with the same employee where we will more than one record for employee number 10. In this case i must select only first record of the form2 for employee number 10 and update the form1 fields. if i edit other records it should not update anything. I hope u understood what i am asking…pls help me.
Following is my code. but its not working
Sub Queryopendocument(Source As Notesuiview, Continue As Variant)
Dim ws As New NotesUIWorkspace
Dim uidoc As notesuidocument
Dim docs As NotesDocumentCollection
Dim doc As NotesDocument
Dim flag As Boolean
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Set docs = Source.Documents
Set doc = docs.GetFirstDocument
If Not (doc Is Nothing) Then
flag = ws.DialogBox ( “Renewal”, True,True,False, True, False, False, “Edit Entry”,doc,False,False,True)
uidoc.FieldSetText(“dxStart”,Cstr(Format(doc.dxstart(0),“mm/dd/yy”)))
Call uidoc.FieldSetText(“dxExpiry”,Cstr(Format(doc.dxExpiry(0),“mm/dd/yy”)))
Call doc.save(True,False)
Call uidoc.Save
Call ws.ViewRefresh
continue=False
Else
flag = ws.DialogBox ( “Renewal”, True,True,False, True, False, False, “Edit Entry”,doc,False,False,True)
End If
End Sub