I work in an Access 97 Database and there are many tables which are linked with SQL Server. Until 2 days the following code worked fine, but suddenly it begins to give Run-time Error 3073. Both Tables are used in the "qry_frmMonthlyPolicy_assistance_append" query and they need to have no records. They have no primary key and when I try to delete records from them manually from Access I couldn't do it. I could only delete records from them from SQL Server side. I didn't open database in read-only mode (I can delete records from other linked tables) and I have permission to delete them.
Could please someone help me?
Private Sub Button12_Click()
DoCmd.RunSQL "delete from tmpMonthlyRiskValue" --- Problem is in this line---
DoCmd.RunSQL "delete from rptMonthlyRiskValue" --- Problem is in this line---
DoCmd.OpenReport "rptMonthlyPolicy_assistance", acViewPreview
Operation must use an updatable query. (Error 3073)
You tried to run, open, or modify a query that isn't updatable.
• You attempted to run a query that tried to update a field that can't be updated. For example, you may have created the query in such a way that you tried to update a field on the one side of a one-to-many relationship.
You tried to use the obsolete OpenQueryDef method on a query that is in a database opened for read-only access.
The database is read-only for one of the following reasons:
• You used the OpenDatabase method or the Visual Basic Data control, and opened the database for read-only access.
The database file has been defined as read-only in your network operating system.
In a network environment, you don't have write privileges for the database file.
Close the database, resolve the read-only condition, and then reopen it for read/write access.
• You don't have permission to make changes to the query. To change your permission assignments, see your system administrator or the query's creator.