Can someone point out why this code crashes at the .Edit saying that the database or query is read-only?
The code is set in an Access 2010 front-end linked to a SQL Server database.
The Access file is not read only - lots of similar procedures run OK.
The dataset the query produces is updateable - i can open it manually and change the DistributeOrderCard field.
Sub TestCust()
Dim db As Database
Dim recust As Recordset
Set db = CurrentDb()
'open customers
Set recCust = db.OpenRecordset("qry101DistNewOrderCards", dbOpenDynaset, dbSeeChanges)
'test
recCust.Edit
recCust![DistributeOrderCard] = False
recCust.Update
End Sub
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.