Results 1 to 4 of 4
  1. #1
    reidn is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jun 2011
    Posts
    37

    Return values from five days ago

    I have a query that needs to retrieve records from a table. The query only needs to take records that are no more than 5 days old or open. Code I tried looks like this...



    WHERE ((([Work Orders].Status)="open")) Or [Work Orders].[Date Assigned]<=DateAdd("d",5,Now());

    What could I be doing wrong? Any Ideas??
    Thanks for all the help,

    Reid

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    WHERE ((([Work Orders].Status)="open")) Or [Work Orders].[Date Assigned]>=DateAdd("d",-5,Date());

  3. #3
    reidn is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jun 2011
    Posts
    37
    Worked like a charm! Thanks Rural Guy

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. No return on Null values
    By forrestapi in forum Queries
    Replies: 4
    Last Post: 10-18-2010, 08:09 AM
  2. Select Dates between days and two days ago?
    By rstonehouse in forum Queries
    Replies: 4
    Last Post: 08-18-2010, 02:13 AM
  3. Return all values from two queries
    By matteu1 in forum Queries
    Replies: 0
    Last Post: 08-18-2009, 01:02 PM
  4. less than 180 days old
    By techexpressinc in forum Queries
    Replies: 2
    Last Post: 06-04-2009, 04:29 PM
  5. Replies: 1
    Last Post: 03-28-2007, 09:18 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