Hi,
Please see below code:
Set Dbs4 = CurrentDb
SQL4 = "SELECT StartDate, EndDate, CertNumber FROM Tbl_Certification_BrokenCourses " _
& "GROUP BY StartDate, EndDate, CertNumber " _
& "HAVING CertNumber = " & Val(Forms!Frm_CertificationEditDatesBrokenCourses. CertNumber) & " ORDER BY EndDate;"
Set Rst4 = Dbs4.OpenRecordset(SQL4)
Rst4.MoveLast: Rst4.MoveFirst
i = 1
With Rst4
.Edit
!StartDate = Me("StartDate" & i)
!EndDate = Me("EndDate" & i)
.Update
i = i + 1
Rst4.MoveNext
End With
Once the ".Edit" is executed, I get the error 3027 - Object is read only.
Does someone know why? I have other code with the ".Edit" and runs without any issues.
Thanks