Queries
Why is my query read-only?
If you cannot edit the data in a query, then it is because Acess thinks it is not updatable.
For a query to be updatable, Access must be able to uniquely identify the record that will be changed. This is normally done by having the primary key. The recordset type must be updatable, You must also have write permission for the database,
To help you identify why your query is not updatable, some thigs to check are:
-
It has a GROUP BY clause. A Totals query is always read-only.
-
It has a TRANSFORM clause. A Crosstab query is always read-only.
-
It uses First(), Sum(), Max(), Count(), etc. in the SELECT clause. Queries that aggregate records are read-only.
-
It contains a DISTINCT predicate. Set Unique Values to No in the query's Properties.
-
It involves a UNION. Union queries are always read-only.
-
It has a subquery in the SELECT clause. Uncheck the Show box under your subquery, or use a domain aggregation function instead.
-
It uses JOINs of different directions on multiple tables in the FROM clause. Remove some tables.
-
The fields in a JOIN are not indexed correctly: there is no primary key or unique index on the JOINed fields.
-
The query's Recordset Type property is Snapshot. Set Recordset Type to "Dynaset" in the query's Properties.
-
The query is based on another query that is read-only (stacked query.)
-
Your permissions are read-only (Access security.)
-
The database is opened read-only, or the file attributes are read-only, or the database is on read-only media (e.g. CD-ROM, network drive without write privileges.)