Results 1 to 4 of 4
  1. #1
    RunTime91 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Posts
    281

    Help reading an update query that appears to be updating another query

    I'm so confused with this one...



    I'm trying to follow the sequence of events in this Db so I know what parts of the db I need to keep and what I can delete.

    This UPDATE query appears to update another query based on its relationship with a table - (I get that queries are just tables themselves)

    But I've never seen this before, or at least not written quite this way...

    Anyway here are the queries

    This is triggered by a DoCmd.OpenQuery Event
    Code:
    UPDATE qryRefDLYsubCR RIGHT JOIN tbl_DLYtmp ON qryRefDLYsubCR.date = tbl_DLYtmp.Date SET tbl_DLYtmp.RefCRttl = qryRefDLYsubCR.RefCRttl, 
    tbl_DLYtmp.RefCR2day = qryRefDLYsubCR.RefCR2day, tbl_DLYtmp.RefCR3day = qryRefDLYsubCR.RefCR3day
    Here is the Query [qryRefDLYsubCR] referenced in the above query
    Code:
    SELECT CDate([F1]) AS [date], CInt([F2]) AS RefCRttl, CInt([F5]) AS RefCR2day, CInt([F7]) AS RefCR3day
    FROM tmpRefWTDCR
    WHERE (((CDate([F1]))<Date()) AND ((IsDate([F1]))=-1));
    I'm completely confused on how to read this

    Help???

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    it says:
    SET tbl_DLYtm

    not SET qryRefDLYsubCR.FIELD
    so it is not updating the query. Just the tbl: tbl_DLYtm

  3. #3
    RunTime91 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Posts
    281
    Geez - Sometimes no matter how many times you look at something - You just don't seet it - jsmh

    Thanks ranman!

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    "qryRefDLYsubCR" is the query where the data comes FROM.


    BTW, "DATE" is a reserved word in Access and shouldn't be used for object names.

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

Similar Threads

  1. Update query not updating---thoughts?
    By WesHarding in forum Queries
    Replies: 10
    Last Post: 03-16-2017, 10:34 AM
  2. Replies: 2
    Last Post: 02-16-2017, 02:22 PM
  3. update query not updating table
    By ui7598h in forum Queries
    Replies: 2
    Last Post: 03-28-2015, 07:49 PM
  4. Replies: 4
    Last Post: 12-06-2014, 08:49 PM
  5. Update query not updating records
    By toer121 in forum Queries
    Replies: 1
    Last Post: 08-25-2011, 07:08 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