طيب اشتغل على نسختك ..
1- اضفت حقل يقرأ الشهر
وفي الجدول الثاني ايضا :
2- الكود التالي في زر VerCcp
Private Sub VerCcp_Click()
Dim monthNumber As Integer
Dim paymentAmount As Double
Dim totalAmount As Double
Dim txtDate As Date
txtDate = Date
monthNumber = Me.PM
paymentAmount = Me.Loan_Other
If Me.VerCcp = True Then
totalAmount = DLookup("TheValueCcp", "Verment", "MON=" & PM)
totalAmount = totalAmount + paymentAmount
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Verment SET TxtMonth=#" & txtDate & "#, TheValueCcp=" & totalAmount & " WHERE MON=" & PM
DoCmd.SetWarnings True
MsgBox " تم دفع المبلغ"
End If
End Sub