I have a form ‘EventEntry’. Now in that formm I have a button ‘Create CheckList’.Now when I am clicking on that button another form’ Checklist’ is getting opened.Now I am editing the ‘CheckList’ form.And when I am saving the CheckList form I want that a field in the 'Event Entry form should get updated and the EventEntry form should get refreshed.
Pls suggest how is this possible.Here is the code for querySave:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
On Error Goto err1
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Dim workspace As New NotesUIWorkspace
Dim uidocCurr As NotesUIDocument
Dim docCurr As NotesDocument
Dim flag As Boolean
Dim ETitle As String
Dim Venue As String
Set uidocCurr = workspace.CurrentDocument
Set docCurr = uidocCurr.Document
ETitle = docCurr.EventTitle(0)
Set db = session.CurrentDatabase
Set view = db.GetView("copyAllEvents" )
' to check for duplicate checklist
searchFormula$ = {Form="frmCheckList" & CheckListSno="} + DocCurr.CheckListsno(0)+{"}
Set collection = db.Search(searchFormula$,Nothing ,0)
If Collection.count>0 Then
Set doc = collection.GetFirstDocument()
If docCurr.UniversalID <> doc.UniversalId Then
Messagebox "The CheckList already exists."
continue =False
Exit Sub
End If
End If
itemname = docCurr.CheckListEventTitle(0) + docCurr.CheckListSno(0)
Set doc = view.GetDocumentByKey(itemname)
If doc Is Nothing Then
Msgbox"No document found:"
Else
doc.CheckListCreated = "True"
Call doc.save(True,True)
End If
Exit Sub
err1:
Msgbox"This is the error:" & Error & " in Module:QuerySave Event in the line:" & Erl
End Sub