Results 1 to 8 of 8
  1. #1
    pdowg881 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    14

    Angry Non Updateable Query Help


    I have a sequel query that pulls employee training records. They can be edited and deleted from the query or a related form. When I add a field from third table to the query, even without creating any new joins, the query is not updateable.
    The added field just shows records matching the current supervisors department. Any ideas what's causing the issue?
    Query Not Updateable

    SELECT Employees.ID, Employees.[Last Name], Employees.[First Name], [Employee Training].Course, [Employee Training].[Training Date], [Employee Training].[Next Due], Employees.Department, Employees.[Work Shift], Employees.[Supervisor Name], Employees.[Supervisor Email], [Employee Training].Hours, Employees.[Active?], [Employee Training].Employee, Supervisors.[Supervisor Email Access]

    FROM Supervisors, Employees INNER JOIN [Employee Training] ON Employees.ID = [Employee Training].Employee


    WHERE ((([Employee Training].[Training Date]) Is Null) AND ((Employees.Department)=[Supervisors].[Department Access]) AND ((Employees.[Active?])=Yes) AND ((Supervisors.[Supervisor Email Access])=GetEmail()))


    ORDER BY Employees.[Last Name], Employees.[First Name];


    Query Updateable
    SELECT Employees.ID, Employees.[Last Name], Employees.[First Name], [Employee Training].Course, [Employee Training].[Training Date], [Employee Training].[Next Due], Employees.Department, Employees.[Work Shift], Employees.[Supervisor Name], Employees.[Supervisor Email], [Employee Training].Hours, Employees.[Active?], [Employee Training].Employee

    FROM Employees INNER JOIN [Employee Training] ON Employees.ID = [Employee Training].Employee

    WHERE ((([Employee Training].[Training Date]) Is Null) AND ((Employees.[Supervisor Email])=GetEmail()) AND ((Employees.[Active?])=Yes))

    ORDER BY Employees.[Last Name], Employees.[First Name];

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    I would suspect that it's because there is no join.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pdowg881 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    14
    I have also tried joining the Employees.Department and Supervisor.[Department Access] fields rather than using Employees.Department = Supervisor.[Department Access]. While yjey both display the same query results, neither results in an updateable query.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    I assume you're running into one of these:

    http://allenbrowne.com/ser-61.html
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    pdowg881 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    14
    Ran into that list a few times and can't seem to find anything that fits. The query is updateable until I reference any field from the supervisors table, whether it been in the Select statement, Where statement, or through a join.

  6. #6
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    you have a cartesian query (no join). try changing this

    ((Employees.Department)=[Supervisors].[Department Access])

    to an inner join

    one thing you can try if you still need multiple tables is to change the recordset type in the form properties to Dynaset Inconsistent updates

    a word of warning, updating multiple tables in the same query can have issues if the joins are not maintained, resulting in orphaned records or, even if the query appears updateable, updates are rejected because they don't meet the relationship rules at the time of update (e.g. try to update a child table before the parent table has been updated). The usual process is to have a mainform and subforms, each with a single table recordsource and linked through the linkchild/linkmaster properties of the subform.

  7. #7
    pdowg881 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    14
    As I've said, I've tried the query as well by joining the Employees.Department and Supervisor.[Department Access] fields rather than using Employees.Department = Supervisor.[Department Access]. If any part of my query refrences that table in any way it become non-updateable. Would there be a way to pull the data I need from that table into a function, and use that instead as a workaround?

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    There are several reasons why a query with a JOIN will not be updateable. One thing to consider is if the fields that are joined are indexed. You can adjust this property in design view of the tables.

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

Similar Threads

  1. Query not updateable
    By j9070749 in forum Queries
    Replies: 1
    Last Post: 11-04-2013, 10:48 AM
  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