Results 1 to 13 of 13
  1. #1
    haydenbl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    11

    Updatable query in Access 2010

    I have a very simple query I would like to update. Both tables have primary keys, I am able to update both tables. I used to be able to do this in previous version. This is just a very simple query. I get results, but cannot update.



    SELECT Test.Med_no, Test.Quest1, Test.Quest2, Test.empDate, [Quest Second].MEME_BIRTH_DT
    FROM Test LEFT JOIN [Quest Second] ON Test.Med_no = [Quest Second].MEDCD_NO;

    Any help you can give me would be greatly appreciated.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Have a look here to see if any of these conditions exist: http://allenbrowne.com/ser-61.html

  3. #3
    haydenbl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    11
    I have been through that list and nothing applies. That is why I can't undertand why this very simply query will not let me update. Any other suggestions?

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Which field is it that you are trying to update?
    Are you trying to update a field that might not exist for a particular record because of the LEFT JOIN?

  5. #5
    haydenbl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    11
    I am trying to update Quest1 and Quest2 fields. Basically I have two tables, 1 tables has all the member information in it and the other table has the questionnaire information in it. I want to use the query for a form and have the med_no the same between the two tables and have them see the name and update the questionnaire information.

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If you are just linking to the second table to get a name to display, note that you could alternatively use the DLOOKUP function instead and not have to use the second table at all in the query.
    If you would still like someone to find out why your query isn't working, you might need to upload a copy of your database for analysis.

  7. #7
    haydenbl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    11
    QuestBack - Copy.accdb

    Attached is a simple version of the database.

  8. #8
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I will take a look at it tonight when I am at a location where I can download it.

  9. #9
    haydenbl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    11
    Thank you for taking a look at it.

  10. #10
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Include this field in the SELECT and see if that fixes it.
    Code:
    [Quest Second].MEDCD_NO

  11. #11
    haydenbl is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    11
    No, that does not help it.

  12. #12
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Generally, I find that this happens when Access "loses addressability" to one or both of the records.

    What's the structure of each of the tables?

    Is there a unique key for each record on Test? Make sure the key is included in the query.

    Is there a unique key for each record on [Quest Second]? Make sure the key is included in the query.

  13. #13
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Are Test.Med_no and [Quest Second].MEDCD_NO unique fields within their respective tables?
    If so, if you set each field to be Indexed with No Duplicates, you will then be able to update the fields.

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

Similar Threads

  1. Updatable query
    By Starscream in forum Queries
    Replies: 3
    Last Post: 04-26-2013, 07:59 AM
  2. Operation must use an updatable query-- error
    By bhushan98 in forum Queries
    Replies: 2
    Last Post: 12-01-2012, 11:32 AM
  3. Creating an updatable query recordset using Access 2010
    By Bill McCoy in forum Programming
    Replies: 1
    Last Post: 04-17-2012, 09:36 AM
  4. Operation must be an updatable query
    By Lorlai in forum Queries
    Replies: 5
    Last Post: 02-02-2012, 02:04 PM
  5. Replies: 1
    Last Post: 12-12-2009, 10: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