Results 1 to 5 of 5
  1. #1
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    408

    update query on two tables not working

    hi
    i want to update the [last name] field of [LK contatti_messaggi TOT UNICI LOCALE] from the same field in [LK Contatti_messaggi_totali] (a query), but it does not work



    Click image for larger version. 

Name:	Cattura.PNG 
Views:	15 
Size:	29.2 KB 
ID:	42989

    Click image for larger version. 

Name:	Cattura2.PNG 
Views:	15 
Size:	22.3 KB 
ID:	42990

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Are you using "Preview Query", or "Run Query"?
    If previewing, it just shows the CURRENT value of that field.
    To actually update it, you have to Run the Update Query.

    If that is still not working, here is a list of reasons why a query may not be updateable: http://allenbrowne.com/ser-61.html
    Go through each one, and see if your query meets any of these conditions.

  3. #3
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    408
    I tried to run and i got the error "you need an updatable query" (more or less..)
    i thought my query was an aggregation query so i got the problem and i made another query based on first query and i had same problem
    i created a new table and used it to update the table i wanted to update and everything went good, thanks

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Glad to hear you got it working.
    Yes, Aggregate (Totals) Queries are not updateable.

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I suspect the reason, which one would find from that excellent link, is that there is no index in either table. Just because there's no PK field in either doesn't guarantee that, but I'd bet your money that a lack of any index was the issue based on the pics. Lack of primary keys or indexes in your db (or at least some of the tables) may prove to be an ongoing issue.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Update Query not working
    By Gerdien in forum Queries
    Replies: 12
    Last Post: 06-23-2017, 07:45 AM
  2. UPDATE query not working
    By BrockWade in forum Queries
    Replies: 5
    Last Post: 02-10-2014, 04:25 PM
  3. Replies: 17
    Last Post: 12-23-2013, 11:22 AM
  4. Update Inner Joing Query not working??
    By snowmman99 in forum Access
    Replies: 2
    Last Post: 09-08-2010, 12:15 PM
  5. IIf Update Query working OK but a better way?
    By dreamweaver547 in forum Queries
    Replies: 7
    Last Post: 04-19-2010, 09:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums