G
Guest
Hi
in a function i have this code
If Not rs.EOF Then
Dim db3 As DAO.Database
Dim rs3 As DAO.Recordset
Set db3 = CurrentDb()
Set rs3 = db.OpenRecordset("tilmelding")
rs3.Index = "kursusplanid"
rs3.Seek "=", rs2("kursusplanid")
rs3.Edit
rs3("kundenr") = rs("kundenummer")
rs3.Update
rs3.Close
End If
it works fine
now in another function i have this:
Dim db3 As DAO.Database
Dim rs3 As DAO.Recordset
Set db3 = CurrentDb()
Set rs3 = db.OpenRecordset("tilmelding")
rs3.Edit
rs3("kundenr") = 1
rs3.Update
rs3.Close
here i get an error on
Set rs3 = db.OpenRecordset("tilmelding")
the error is:
run time error 424
objecet required
i don't understand this ?
Alvin
in a function i have this code
If Not rs.EOF Then
Dim db3 As DAO.Database
Dim rs3 As DAO.Recordset
Set db3 = CurrentDb()
Set rs3 = db.OpenRecordset("tilmelding")
rs3.Index = "kursusplanid"
rs3.Seek "=", rs2("kursusplanid")
rs3.Edit
rs3("kundenr") = rs("kundenummer")
rs3.Update
rs3.Close
End If
it works fine
now in another function i have this:
Dim db3 As DAO.Database
Dim rs3 As DAO.Recordset
Set db3 = CurrentDb()
Set rs3 = db.OpenRecordset("tilmelding")
rs3.Edit
rs3("kundenr") = 1
rs3.Update
rs3.Close
here i get an error on
Set rs3 = db.OpenRecordset("tilmelding")
the error is:
run time error 424
objecet required
i don't understand this ?
Alvin