Results 1 to 3 of 3
  1. #1
    bronzyroo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    2

    Question Query involving a date calculation

    Hi All,

    I currently have a database which includes a date field (InitialDate).

    Basically, I need to design a query that will prompt me to take action on any record for which the date under InitialDate is > or = 6 months ago. Alternatively this couuld be coded as InitialDate + 6 months > or = today's date. I also want to add an additional condition stipulating that the query is not to include any records that have anything entered in a seperate field (ActionTaken).



    As I know very little about access/ programming I have no idea where to start. Can someone help me out?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    Have a query with criteria under the InitialDate field to retrieve records where the InitialDate is before 6 months ago.

    Current date is 2/14/2012

    <= DateAdd ("m",-6,Date())

    will return records with InitialDate earlier than or equal to 8/14/2011.

    Criteria under ActionTaken could be (to handle possibility of null or empty string - I don't allow empty strings in tables):
    Is Null Or <> ""

    Is that what you want?
    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.

  3. #3
    bronzyroo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    2
    That is exactly what I needed. Thank you so much

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

Similar Threads

  1. Date Calculation
    By Lazor78 in forum Forms
    Replies: 4
    Last Post: 01-25-2012, 11:53 AM
  2. Replies: 1
    Last Post: 12-15-2011, 04:44 AM
  3. Date Calculation
    By mrkaye in forum Forms
    Replies: 4
    Last Post: 11-10-2010, 10:42 AM
  4. Date Calculation
    By mrkaye in forum Forms
    Replies: 4
    Last Post: 11-09-2010, 06:52 PM
  5. Query involving data from different sources
    By nodnud in forum Queries
    Replies: 1
    Last Post: 08-12-2010, 06:11 PM

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