Kod:
If MsgBox("TAKSİT İŞLEMİNİ GERÇEKLEŞTİREYİMMİ?", vbYesNo, "GERİ ALMA UYARISI") = vbYes Then
If IsNull([A2]) Or IsNull([A3]) _
Or IsNull([AA4]) Or IsNull([AA5]) Or IsNull([A5]) _
Or IsNull([AA7]) Or IsNull([A6]) Or IsNull([C1]) Or IsNull([GF1]) Or IsNull([BT]) Or IsNull([ACIK1]) Then
MsgBox "Lütfen Boşlukları doldurunuz!!"
DoCmd.GoToControl "DaıreNo"
Exit Sub
End If
If Me.AA4 > 0 Then
'Pesin
End If
Set db = CurrentDb
Dim Rc As DAO.Recordset
Dim rstRecords As Recordset
'Dim a As Integer, s As Integer
Set rstRecords = db.OpenRecordset("tbl_UYEGENEL")
Set Rc = CurrentDb.OpenRecordset("TBLUYEODEMETABLOSU")
Dim myString, myString1 As String
Dim myNumber As Variant
Dim x, y As Integer
'Dim e As Date
y = CInt(A5.Value)
GSayi = 1
rstRecords.MoveFirst
Do While Not rstRecords.EOF
For x = 1 To y
Rc.AddNew
If x > 0 Then
Rc![DaıreNo] = rstRecords.Fields(2)
Rc![adsoyad] = rstRecords.Fields(4)
Rc![BLOK] = rstRecords.Fields(1)
Rc![KIMID] = rstRecords.Fields(0)
Rc![BORCNO] = rstRecords.Fields(0)
Rc![ACIKLAMA] = ACIK1.Value
Rc![BORCLANTAR] = BT.Value
Rc![GFNO] = GF1.Value
Rc![AdatCinsi] = C1.Value
Rc![TaksitSay] = "" & "( " & x & " / " & y & " )"
Rc![TaksitMik] = AA7.Value
S = DatePart("yyyy", A6.Value)
A = DatePart("m", A6.Value)
E = DatePart("d", A6.Value)
A = A '+ 1
Rc![VadeTar] = DateSerial(S, A, E)
' Rc![VadeTar] = DateAdd("ww", X, A6.Value)
End If
If x > 1 Then
Rc![VadeTar] = DateAdd("m", x - 1, DateSerial(S, A, E))
End If
Rc.Update
Next x
rstRecords.MoveNext
Loop
rstRecords.Close
Rc.Close
db.Close
Set Rc = Nothing
Set rstRecords = Nothing
Set db = Nothing
Form.Refresh
Else
End If