View Full Version : Updatable query


jesseb
02-21-2002, 03:28 PM
I have read through the issues that cause a query be unupdatable. My issue is that: The query contains a group by clause.

I use this group by clause to show the records that need to be changed. Has anyone had a similar issue and how did you get around it?

Pat Hartman
02-21-2002, 05:51 PM
Access is actually quite flexible with creating updateable queries. However, it does have one inflexible rule and that is that ALL the components (ie tables and nexted queries) must be updateable. Queries that include agregate functions such as group by, sum, max, etc. are NEVER updateable because the individual record identifiers cannot be included in the output recordset.

There are two possible solutions.
1. Change the query that includes the group by to a make table query. Then join that "temp" table to your main table to find the individual records that need updating.
2. Depending on what your totals query is actually looking for, you may be able to turn it into a sub-query and use the Having clause to match records from the totals query to the main table.