11/07/2024, 11:39
Arkadaşlar, aşağıdaki kod ile sorgudaki verileri tabloya aktarmak istiyorum
Set rst1 = CurrentDb.OpenRecordset("SELECT * FROM S_MdfRct where UrunAdi ='" & [Urun] & "'")
bu satır hata veriyor neden acaba.?
Private Sub Komut15_Click()
Dim rst1 As DAO.Recordset
Dim rst2 As DAO.Recordset
Set rst1 = CurrentDb.OpenRecordset("SELECT * FROM S_MdfRct where UrunAdi ='" & [Urun] & "'")
Set rst2 = CurrentDb.OpenRecordset("select * MdfRecete ")
With rst1
Do While Not .EOF
rst2.AddNew
rst2!UrunAdi = !Yeni
rst2!ParcaAdi = !ParcaAdi
rst2!En = !En
rst2!Boy = !Boy
rst2!TakimSay = !TakimSay
rst2!Rengi = !Rengi
rst2.Update
.MoveNext
Loop
End With
End Sub
Set rst1 = CurrentDb.OpenRecordset("SELECT * FROM S_MdfRct where UrunAdi ='" & [Urun] & "'")
bu satır hata veriyor neden acaba.?
Private Sub Komut15_Click()
Dim rst1 As DAO.Recordset
Dim rst2 As DAO.Recordset
Set rst1 = CurrentDb.OpenRecordset("SELECT * FROM S_MdfRct where UrunAdi ='" & [Urun] & "'")
Set rst2 = CurrentDb.OpenRecordset("select * MdfRecete ")
With rst1
Do While Not .EOF
rst2.AddNew
rst2!UrunAdi = !Yeni
rst2!ParcaAdi = !ParcaAdi
rst2!En = !En
rst2!Boy = !Boy
rst2!TakimSay = !TakimSay
rst2!Rengi = !Rengi
rst2.Update
.MoveNext
Loop
End With
End Sub