Results 1 to 2 of 2
  1. #1
    aaslezak is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2015
    Posts
    34

    Updating with select

    I am not sure how to do this in access if it is an update query or what but I am trying to update a field based on a summary query. I want it to be one of three values depending on the calculation. Here is the calculation
    Select
    When =datediff("d", date(), [Implementation Date]) - ([SumOfRemaining Hours]/6) < 1
    Project color status = 'Red'
    When =datediff("d", date(), [Implementation Date]) - ([SumOfRemaining Hours]/6) >= 1 and <= 3


    Project color status = 'Yellow'
    When =datediff("d", date(), [Implementation Date]) - ([SumOfRemaining Hours]/6) > 3
    Project color status = 'Green'
    Endselect

    Project color status is a character field here is my update query is there some way to fill in the update field for different selections I cannot seem to get to VBA from this point on the properties sheet.
    Attached Thumbnails Attached Thumbnails Project Listing Update Project Status query.JPG  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Normally, should not save calculated dated to table, calculate when needed. If this calc can be done in a query to update table, it can be done when needed in form or report. Why save color values to table?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 5
    Last Post: 05-14-2014, 01:17 PM
  2. Updating form after updating and closing a popup window
    By Historypaul in forum Programming
    Replies: 2
    Last Post: 04-21-2014, 02:13 AM
  3. Replies: 5
    Last Post: 07-26-2012, 12:59 PM
  4. Replies: 2
    Last Post: 03-27-2012, 01:02 PM
  5. Replies: 8
    Last Post: 04-21-2011, 05:29 PM

Tags for this Thread

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