Results 1 to 3 of 3
  1. #1
    soldat452002 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    16

    Find Match by Date Range


    Hello,

    I have a problem keeping up all night, I have to find the Status of each Producer ID found on the tblStatus per Date Range. So the results I am looking for is I'm able bring over the Status from my TblStatus.Status to tblProducer.Status by Date Range criteria. Can anyone help with this please?

    ProducerId Year State DateEff DateExp Status
    0000338191 2016 OR 1/1/2016 1/1/2200 TEXP


    tblProducer

    ProducerId Year State DateEff DateExp Status
    0000338191 2016 OR 1/1/2016 1/1/2200
    0000338191 2015 OR 1/1/2015 12/31/2015
    0000338191 2014 OR 1/1/2014 12/31/2014
    0000338191 2013 OR 1/1/2013 12/31/2013
    0000338191 2012 OR 1/1/2012 12/31/2012
    0000338191 2011 OR 1/1/2011 12/31/2011
    0000338191 2010 OR 1/1/2010 12/31/2010
    0000338191 2009 OR 1/1/2009 12/31/2009
    0000338191 2008 OR 1/1/2008 12/31/2008
    0000338191 2007 OR 1/1/2007 12/31/2007
    0000338191 2006 OR 1/1/2006 12/31/2006

    TblStatus

    ProducerID State Status Eff Exp
    0000338191 OR TERMREL 8/7/2015 4/30/2016
    0000338191 OR COMPLETE 10/3/2013 8/6/2015
    0000338191 OR TEXP 5/1/2016 01/01/2200

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    UPDATE tblProducer INNER JOIN tblStatus ON (tblProducer.State = tblStatus.State) AND (tblProducer.ProducerId = tblStatus.ProducerId) SET tblProducer.Status = [tblStatus].[Status]
    WHERE (((tblProducer.DateEff) Between [tblStatus].[DateEff] And [tblStatus].[DateExp])) OR (((tblProducer.DateExp) Between [tblStatus].[DateEff] And [tblStatus].[DateExp]));

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    cross posted here

    http://www.access-programmers.co.uk/...92#post1497592

    OP already advised of the dangers of cross posting

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

Similar Threads

  1. Replies: 3
    Last Post: 02-26-2016, 01:03 PM
  2. Replies: 3
    Last Post: 01-26-2016, 01:56 PM
  3. Replies: 2
    Last Post: 07-27-2015, 06:53 AM
  4. Replies: 4
    Last Post: 07-24-2015, 02:11 AM
  5. Find Min and Max in a selected date range
    By rkalapura in forum Queries
    Replies: 9
    Last Post: 04-01-2013, 09:24 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