Private Sub Knop16_Enter()
Dim rs As Recordset
Dim rs2 As Recordset
Set rs = CurrentDb.OpenRecordset("Allowed_Options")
Set rs2 = CurrentDb.OpenRecordset("Uitvoering")
rs.MoveLast
rs.MoveFirst
While (Not rs.EOF And Not rs.BOF)
MsgBox rs("Standaard")
If (rs("Standaard") = True) Then
' element toevoegen aan Uitvoering
rs2.AddNew
rs2("optiecode") = rs("Optiecode")
rs2("optieomschrijving") = rs("Optieomschrijving")
rs2("optieprijs") = rs("Optieprijs")
rs2("standaard") = rs("Standaard")
rs2.Update
End If
rs.MoveNext
Wend
rs.Close
rs2.Close
Set rs = Nothing
Set rs2 = Nothing
[uitvoering].Requery
End Sub
This piece of code gives a 'Too few arguments: expected 1" error on the 'set rs ....' line
What can I do about it?
Dim rs As Recordset
Dim rs2 As Recordset
Set rs = CurrentDb.OpenRecordset("Allowed_Options")
Set rs2 = CurrentDb.OpenRecordset("Uitvoering")
rs.MoveLast
rs.MoveFirst
While (Not rs.EOF And Not rs.BOF)
MsgBox rs("Standaard")
If (rs("Standaard") = True) Then
' element toevoegen aan Uitvoering
rs2.AddNew
rs2("optiecode") = rs("Optiecode")
rs2("optieomschrijving") = rs("Optieomschrijving")
rs2("optieprijs") = rs("Optieprijs")
rs2("standaard") = rs("Standaard")
rs2.Update
End If
rs.MoveNext
Wend
rs.Close
rs2.Close
Set rs = Nothing
Set rs2 = Nothing
[uitvoering].Requery
End Sub
This piece of code gives a 'Too few arguments: expected 1" error on the 'set rs ....' line

What can I do about it?