Results 1 to 5 of 5
  1. #1
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476

    Return Records X-amount of days to current date


    I need to run a queriy which will show me all of the records 60-days past the current date. Like in Conditional Formatting I tried "Now()-60" in the criteria within a query, but it doesn't work. Does anyone know whatcriteria I need to use in a query showing me the records 60-dys past the current date?

    Thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Try

    <(Date - 60)

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,065
    I'm going to make some assumptions here because your statement doesn't make sense. 60 Days past the current date assuming today is 11/10/2011 is 1/09/2012. Your Criteria is prior to current date. Now()-60 makes the criteria exacly 60 days prior I would use <= Now()-60

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I interpret the post as 'records that are 60 or more days past due'.
    So if the dueDate was on or before 60 days earlier than today, the record gets selected.

  5. #5
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    From RayMalhon, <= Now()-60 worked, except it wasn't the results I was aiming for. In my Employees Payroll Table, any employee who hasn't work in 60-days would be terminated & I only wanted those records shown in my query.

    Another way I achieved my goal was that in another table, "Emoyplee Info" I have a field entitlted, "EndDate" which I manually type in the last day an employee worked. Then I ran my query on that table just showing my terminated employees. I'm sure that there is a more automative way to extract the data/records I'm needing from my Employees/Payroll Table, bbut it's beyond me.

    Thanks to all!

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

Similar Threads

  1. Replies: 2
    Last Post: 10-08-2011, 06:33 PM
  2. Replies: 5
    Last Post: 06-30-2011, 02:24 AM
  3. Aslways show Current Date even in Old records
    By farhanahmed in forum Programming
    Replies: 3
    Last Post: 04-03-2011, 12:56 PM
  4. Replies: 2
    Last Post: 04-27-2010, 01:25 PM
  5. Replies: 4
    Last Post: 01-29-2009, 02:43 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