03/07/2018, 22:50
Arkadaşlar formdan taloya [fgplt] ve [fyil] alanlarını +1 artırarak istenilet sayıda kayıt işlemesini nasıl yaparız.
Private Sub fcoklukyt_Click()
Dim rs As Recordset, rs1 As Recordset
Dim t As Integer
Set rs = CurrentDb.OpenRecordset("select ISTARIH, SANTIYE, UGRUBU, KALITE, VARDIYA, MUSTERI, URUN, YUZEY, BOY, EN, KALINLIK, BIRIM, ADET, METRAJ, KMETRAJ, BARKOD3, PLTADET, PLTNO_GUN, PLTNO_YIL")
Set rs1 = CurrentDb.OpenRecordset("ETIKET_GIRIS")
rs.MoveFirst
Do Until rs.EOF
For t = 1 To rs.Fields("ADET")
rs1.AddNew
rs1.Fields("ISTARIH") = Me.ftrh1
rs1.Fields("SANTIYE") = Me.fsantiye
rs1.Fields("UGRUBU") = Me.fugrub
rs1.Fields("KALITE") = Me.fkalite
rs1.Fields("VARDIYA") = Me.fvardiye
rs1.Fields("MUSTERI") = Me.fmusteri
rs1.Fields("URUN") = Me.furun
rs1.Fields("YUZEY") = Me.fyuzey
rs1.Fields("BOY") = Me.fboy
rs1.Fields("EN") = Me.fen
rs1.Fields("KALINLIK") = Me.fkalin
rs1.Fields("BIRIM") = Me.fbirim
rs1.Fields("ADET") = Me.fadet
rs1.Fields("METRAJ") = Me.fsmetraj
rs1.Fields("BARKOD3") = Me.barkod4
rs1.Fields("PLTADET") = Me.fetiktadet
rs1.Fields("PLTNO_GUN") = Me.fgplt + 1
rs1.Fields("PLTNO_YIL") = Me.fyil + 1
rs1.Update
Next
rs.MoveNext
Loop
rs.Close
rs1.Close
End Sub
Private Sub fcoklukyt_Click()
Dim rs As Recordset, rs1 As Recordset
Dim t As Integer
Set rs = CurrentDb.OpenRecordset("select ISTARIH, SANTIYE, UGRUBU, KALITE, VARDIYA, MUSTERI, URUN, YUZEY, BOY, EN, KALINLIK, BIRIM, ADET, METRAJ, KMETRAJ, BARKOD3, PLTADET, PLTNO_GUN, PLTNO_YIL")
Set rs1 = CurrentDb.OpenRecordset("ETIKET_GIRIS")
rs.MoveFirst
Do Until rs.EOF
For t = 1 To rs.Fields("ADET")
rs1.AddNew
rs1.Fields("ISTARIH") = Me.ftrh1
rs1.Fields("SANTIYE") = Me.fsantiye
rs1.Fields("UGRUBU") = Me.fugrub
rs1.Fields("KALITE") = Me.fkalite
rs1.Fields("VARDIYA") = Me.fvardiye
rs1.Fields("MUSTERI") = Me.fmusteri
rs1.Fields("URUN") = Me.furun
rs1.Fields("YUZEY") = Me.fyuzey
rs1.Fields("BOY") = Me.fboy
rs1.Fields("EN") = Me.fen
rs1.Fields("KALINLIK") = Me.fkalin
rs1.Fields("BIRIM") = Me.fbirim
rs1.Fields("ADET") = Me.fadet
rs1.Fields("METRAJ") = Me.fsmetraj
rs1.Fields("BARKOD3") = Me.barkod4
rs1.Fields("PLTADET") = Me.fetiktadet
rs1.Fields("PLTNO_GUN") = Me.fgplt + 1
rs1.Fields("PLTNO_YIL") = Me.fyil + 1
rs1.Update
Next
rs.MoveNext
Loop
rs.Close
rs1.Close
End Sub