Solved

Update on Access?

Posted on 2012-03-12
8
232 Views
Last Modified: 2012-03-13
Hi,

I'm trying to do an update on access, but I keep getting "Operation must use an updateable query"

I have full access to the table that I'm trying to do updates on, and on some REAL simple updates, it seems to go through.  

Basically I have a table A that contains client info (name, etc.. and also updateuser, updatedate)
Table B contains the clientname, updateuser, rundate
I first try to find the latest run dates of each clients so I have a query called C:
SELECT a.*
FROM B as a, (SELECT clientname, max(rundate) as latest_date FROM B GROUP BY clientname) as F
WHERE a.clientName = F.clientName and a.rundate = f.latest_date

So basically I'm just trying to update the table to include the latest user and the date...  
I believe the issue has to do with me trying to update from a query that includes grouping...  Any idea how to get around this?  Thanks!



I want to update the
0
Comment
Question by:iamnamja
8 Comments
 

Expert Comment

by:gnetgnet
ID: 37711953
It is the join it doesnt like. Can you find the keys and after that update the row with the data you want.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37712004
see this link for reasons and possible solution

http://msdn.microsoft.com/en-us/library/aa198446%28office.10%29.aspx
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37712010
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

Author Comment

by:iamnamja
ID: 37712029
Ok...

so according to: http://allenbrowne.com/ser-61.html

It's a read only when there's a group by...  But it has group by on the other table that i'm trying to take values from and not on the table that i'm trying to update.

Why would this cause an issue?
0
 
LVL 30

Expert Comment

by:hnasr
ID: 37712190
Supply an example demonstrating the problem.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 37713569
'It's a read only when there's a group by...  But it has group by on the other table that i'm trying to take values from and not on the table that i'm trying to update.'

I'm afraid that even though your logic is fine, it doesn't alter reality.
Any query involving a GroupBy anywhere in its structure is regarded as non-updateable by Access.

You can use a DMax() function instead of the subquery as the update value.
0
 
LVL 84
ID: 37713836
Can you post the SQL of your Update query here?
0
 

Author Closing Comment

by:iamnamja
ID: 37715380
Thanks all, I have decided to go by dmax which seems to work fine.  Thanks.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question