Results 1 to 6 of 6
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Non-updateable query


    Most of the fields in the query below are updateable while the fields in the tblPets are not. For example, I have a form with a text box bound to "Pet1". I can neither update that text box or directly into the query. Allen Browne writes about JOINS in the opposite directions, but I don't believe that's the case here. For example, I can readily update the fields in the table "tblAutoMfg", both in bound text boxes as well as directly into the query. What am I missing?

    Code:
    SELECT tblRegistry.RegistryID, tblRegistry.LastName, tblRegistry.FirstName, [lastname] & ", " & [firstname] AS Name, tblRegistry.SalID, tblRegistry.Title, tblRegistry.Gender, tblRegistry.RegAs, tblRegistry.Unit, tblRegistry.Parking, tblRegistry.LandLine, tblRegistry.Ext, tblRegistry.Cell, tblRegistry.EMA, tblRegistry.ImageName, tblRegistry.GroupIDs, tblRegistry.Notes, tblRegistry.Selected, tblRegistry.PubCell, tblRegistry.PubEMA, tblRegistry.TxtOkay, tblRegistry.EMOkay, tblRegistry.VoiceOkay, tblRegistry.PrivStaff, tblRegistry.DirPDF, tblPets.Pet1, tblPets.Sp1, tblPets.Pet2, tblPets.Sp2, tblPrkgStalls.StallNum, tblAutoMfg.MFG, tblAutoModels.Model, tblAutoColors.Color, tblPrkgStalls.LiNum
    FROM ((((tblRegistry LEFT JOIN tblPets ON tblRegistry.Unit = tblPets.AptNum) LEFT JOIN tblPrkgStalls ON tblRegistry.Parking = tblPrkgStalls.StallID) LEFT JOIN tblAutoMfg ON tblPrkgStalls.MfgID = tblAutoMfg.MfgID) LEFT JOIN tblAutoModels ON tblPrkgStalls.ModID = tblAutoModels.ModelID) LEFT JOIN tblAutoColors ON tblPrkgStalls.ColorID = tblAutoColors.ColorID;
    Click image for larger version. 

Name:	002.jpg 
Views:	13 
Size:	85.3 KB 
ID:	44869

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    What about #8 in his list?
    Copy the query, delete a table (preferably one that does not eliminate other tables) and test.
    Rinse and repeat until it's editable. That might tell you which table is the problem, or it might be that table in partnership with one of the previously deleted ones.

    I would have thought that you'd know that repeating like fields is an indicator of design issues (tblPets). Perhaps you inherited this db?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    All fields in the query are updateable except those in the tblPets. Normally, I would have designed the pets table allowing duplicate ID field so as to associate with a single "AptNum". In the current app, a single "AptNum" can only have two pets. So, I choose to create two bound text boxes as I've done here and JOINed the tables. If there's a simpler way, I'm all ears.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    At the risk of repeating myself, how about item #8, and what happens when you remove tables and test, including altering joins?
    Too late, I just did repeat myself.

    Check your outer joins. I think you're saying there should be a stall mod id but not necessarily a models.modelID. No idea if that describes your situation or not.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    No idea if that describes your situation or not.
    Your comment spurred the thought about being sure that the keyed fields be included in the query. Alas, the query needed the primary keyed field of the pets table, i.e., tblPets.AptNum.
    Thanks,
    Bill

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Not sure if that's exactly what #8 means, or if AB strictly was referring to the lack of a unique index on the fields that make up the join. However, what you say makes sense because if a unique index is not part of the query, how is Access supposed to know which record from that table would become part of the record returned by the query? My guess is that you have (or could have) multiple records in your query where every other field is the same value except for values returned by the table that has no PK or unique index.
    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. Query not updateable
    By mcucino in forum Queries
    Replies: 7
    Last Post: 02-20-2019, 07:40 PM
  2. updateable query with max()
    By ElRudi in forum Queries
    Replies: 11
    Last Post: 12-15-2011, 02:55 PM
  3. Must use updateable query
    By adams.bria in forum Queries
    Replies: 1
    Last Post: 08-29-2011, 10:31 AM
  4. Need Query To Be Updateable
    By robsworld78 in forum Queries
    Replies: 11
    Last Post: 07-17-2011, 09:06 PM
  5. Non-Updateable Query
    By swalsh84 in forum Queries
    Replies: 4
    Last Post: 04-27-2011, 12:39 PM

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