Private Sub Loan_Remise_AfterUpdate()
On Error GoTo Errw
If Me.txt_tot = Me.Loan_Remise Then
   DoCmd.GoToRecord , , acNext
    For i = 1 To Me.Recordset.RecordCount
        DoCmd.SetWarnings False
        DoCmd.RunCommand acCmdSelectRecord
        DoCmd.RunCommand acCmdDeleteRecord
        DoCmd.SetWarnings True

    Next i
Exit Sub
Errw:
DoCmd.GoToRecord , , acLast
Me.Loan_Made = Me.Loan_Remise
Me.Payment_Made = Me.Loan_Remise
Me.Nr = 15
[Forms]![frmCridi]![Frm_sub].[Form]![DiscountEndDate] = Me.Payment_Month

Else
MsgBox "    "
End If
'Me.VerCcp = 1
Me.sadad = 1
Me.Payment_Month = Date
    If Me.sadad.Value = True Then
Me.wada3 = " "
Ncridi = Me.Remarks
If MsgBox("    ", vbYesNo) = vbYes Then Me.Remarks = Ncridi & " " & "(     :" & " " & Year([Payment_Month]) & "/" & Month(Format([Payment_Month], "##00")) & "/" & Day([Payment_Month]) & ")"
Else
Me.wada3 = "  "
End If

End Sub
