I have a form1, on this form is a button that opens a new form2 where you can enter some numbers.When you close this form2 there is lotusscript that counts all the form2 that it finds and then counts the numbers and put that in form1.
But the problem is, form1 is not in edit mode en the changes made with the lotusscript aren’t updatet until you close the form en reopen it.
Can somebody help me?
Sub Queryclose(Source As Notesuidocument, Continue As Variant)
Dim formula As String
Dim doc As NotesDocument
Set doc = Source.Document
Dim s As New notessession
Dim Db As notesdatabase
Set Db=S.CurrentDatabase
Dim doc1 As notesdocument
Set documenten1 = Db.getview(".LookupVerlofAanvraag")
Set doc1=documenten1.getfirstdocument
Do While Not (doc1 Is Nothing)
If doc1.EMPLNUMB(0) = doc.EMPLNUMB(0) Then
verlof = doc1.VerlofOpnemen(0) + verlof
compensatie = doc1.CompensatieOpnemen(0) + compensatie
End If
Set doc1=documenten1.getnextdocument(doc1)
Loop
Set documenten = Db.getview(".LookupVerlofKaart")
Set doc1=documenten.GetDocumentByKey(doc.EMPLNUMB(0))
Do While Not (doc1 Is Nothing)
If doc1.EMPLNUMB(0) = doc.EMPLNUMB(0) Then
doc1.VerlofOpgenomen = verlof
doc1.VerlofRest = (doc1.RestVerlof(0) + doc1.Verlof(0)) - verlof
doc1.CompensatieOpgenomen = compensatie
doc1.CompensatieRest = doc1.Compensatie(0) - compensatie
Call doc1.Save(True,False)
Set doc1=documenten.getLastDocument
End If
Set doc1=documenten.getnextdocument(doc1)
Loop
End Sub