When I select No to any of my prompts, it still saves the document?
Any ideas? Thank you.
** my code **
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim ws As New notesuiworkspace
Dim s As New NotesSession
…
Dim gstotal As Double
Dim gstamt As Double
Dim response As Integer
Set db = s.currentdatabase
Set doc = source.Document
If source.IsNewDoc Then
gstotal = doc.GTotal(0) * 1.25
gstamt1 = doc.invoiceAmt(0) - gstotal
gstamt2 = doc.invoiceAmt(0) - doc.GTotal(0)
If doc.gstInv(0) = “Yes” Then
If gstamt1 <> 0 Then
response = ws.Prompt (PROMPT_YESNO, _
“GST Invoice”, “The invoice amount does not equal 12.5%, do you wish to continue?”)
If response = 1 Then
Continue = True
Else
Continue = False
End If
End If
Else
response = ws.Prompt (PROMPT_YESNO, _
“GST Invoice”, “The invoice amount does not have GST are you sure you wish to continue?”)
If response = 1 Then
If gstamt <> 0 Then
Msgbox “The line items total does not match the Invoice amount please check your values”
Exit Sub
End If
Else
Continue = False
End If
End If
End If
End Sub