I have one main membership form. From here i will go to history form where there will more than one record for the particular member. My request is, when i edit only first record it should update two fields in the parent. if i edit other record it should not update. Please help me as i am new to lotus notes programming. For all records its going to Ist If statement, i.e not going main else.
Following is my code
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
If doc.Form(0)=“Renewal” Then
flag = ws.DialogBox ( “Renewal”, True,True,False, True, False, False, “Edit Entry”,doc,False,False,True)
If cxEntryType=“Renew” Then Call 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
endif
Else
If doc.Form(0)=“Renewal” Then
flag = ws.DialogBox ( “Renewal”, True,True,False, True, False, False, “Edit Entry”,doc,False,False,True)
End If
End If
End Sub