opopanax666
Registered User.
- Local time
- Today, 01:01
- Joined
- Nov 2, 2006
- Messages
- 44
Hi everybody,
can someone spot why only the fields from the first record in "qryBestellingen_nieuw" are copied when I click the button, although it contains about a dozen records with "Status" = 1
can someone spot why only the fields from the first record in "qryBestellingen_nieuw" are copied when I click the button, although it contains about a dozen records with "Status" = 1

Code:
Private Sub Knop21_Click()
Dim db As Database
Dim rs As DAO.Recordset
Dim rs2 As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("SELECT * FROM qryBestellingen_nieuw WHERE [Status] = 1")
Set rs2 = db.OpenRecordset("tblBestellingen_magazijn")
With rs2
.AddNew
.Fields("Bestelling_id") = rs!Bestelling_id
.Fields("Product") = rs!Product
.Update
.Close
End With
rs.Close
End Sub