L
Linq Adams via AccessMonster.com
Why won't this code update my recordset? I get Error 3027 "Cannot update.
Database or object is Read Only." Form is based on a query with 4 fields,
which in turn is based on a table with the same 4 fields. Both the form and
the query can be edited.
Microsotf DAO 3.6 Object Library is set in references
*******************Code******************
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("MyQuery")
Do While Not rs.EOF
rs.Edit
rs!MyCheckBox = -1
rs.Update
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
*****************End Code****************
Running Access 2003/SP2, Windows XP
Database or object is Read Only." Form is based on a query with 4 fields,
which in turn is based on a table with the same 4 fields. Both the form and
the query can be edited.
Microsotf DAO 3.6 Object Library is set in references
*******************Code******************
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("MyQuery")
Do While Not rs.EOF
rs.Edit
rs!MyCheckBox = -1
rs.Update
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
*****************End Code****************
Running Access 2003/SP2, Windows XP