Hi All
Im am trying to edit this record set but keep getting:
Runtime error 3027 Cannot update. Database or Object is read only.
This is code l am using.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim StrString As String
StrString = "SELECT Timein.ID, Timein.[Employee Name], Timein.[Return Date]" _
& "FROM Logon INNER JOIN Timein ON Logon.Employee = Timein.[Employee Name]" _
& "WHERE (((Timein.[Return Date]) Is Null))" _
& "ORDER BY Timein.ID DESC;"
Set db = CurrentDb
Set rst = db.OpenRecordset(StrString)
Do Until rst.EOF
With rst
rst.Edit
rst("Return Date") = Date
rst.Update
End With
Loop
Can any see whats wrong Please
Im am trying to edit this record set but keep getting:
Runtime error 3027 Cannot update. Database or Object is read only.
This is code l am using.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim StrString As String
StrString = "SELECT Timein.ID, Timein.[Employee Name], Timein.[Return Date]" _
& "FROM Logon INNER JOIN Timein ON Logon.Employee = Timein.[Employee Name]" _
& "WHERE (((Timein.[Return Date]) Is Null))" _
& "ORDER BY Timein.ID DESC;"
Set db = CurrentDb
Set rst = db.OpenRecordset(StrString)
Do Until rst.EOF
With rst
rst.Edit
rst("Return Date") = Date
rst.Update
End With
Loop
Can any see whats wrong Please
Last edited: