Results 1 to 4 of 4
  1. #1
    tanner.morgan is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    2

    Update Query with Criteria in update to table


    I have an update query that I would like to only update records based on shift (1, 2, or 3). When I place this criteria in it only selects those in the table that is being updated and not those in the table that contains the new or changed data. MY SQL Statement is below

    UPDATE Empl RIGHT JOIN [Empl Update] ON Empl.Emplid = [Empl Update].Emplid SET Empl.Employee = [Empl Update].[Employee], Empl.Emplid = [Empl Update].[Emplid], Empl.Department = [Empl Update].[Department], Empl.[Position] = [Empl Update].[Position], Empl.[Job Profile] = [Empl Update].[Job Profile], Empl.Shift = [Empl Update].[Shift], Empl.[Manager - Level 01] = [Empl Update].[Manager - Level 01], Empl .[Manager - Level 02] = [Empl Update].[Manager - Level 02]
    WHERE (((Empl.Shift)="1")):

    I have tried changing the WHERE Clause to Empl Update="1" but I reveive a syntax error

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Is Empl Update a number or text ?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    tanner.morgan is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    2
    it is short text

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    In that case should it be

    Code:
     [Empl Update].[Shift] = "1"
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Update table using a two criteria query
    By Oceaneng in forum Access
    Replies: 5
    Last Post: 08-07-2017, 07:48 AM
  2. Replies: 4
    Last Post: 04-27-2016, 04:36 PM
  3. Replies: 7
    Last Post: 08-26-2013, 06:05 AM
  4. Replies: 1
    Last Post: 10-29-2012, 08:15 AM
  5. Query Criteria Lost After Table Update
    By matt4003 in forum Queries
    Replies: 10
    Last Post: 12-29-2009, 10:50 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