Results 1 to 4 of 4
  1. #1
    LukeJ Innov is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    31

    Query that show certain results


    Hello All,

    Im currently building a small database for a client, but they have asked me for something which has stumped me. Here goes:

    I have a column in a table that is a range of dates, how would I create a query so it only shows dates that are 11 months old if you get my drift.
    The table shows information on boilers (those things that heat your water in your homes ) every year the company carries out a service on said boilers. I want the query to show the service dates that are 11 months old, so the customer know that that boiler will need another service soon.

    Thanks in advance,

    Regards
    Luke

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Try:

    SELECT * FROM table WHERE DateAdd("m",11,[ServiceDate])<=Date());
    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
    LukeJ Innov is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    31
    Hi,

    The code does not seem to be working for me? It shows the results but im getting all of the dates, not just the ones that are over 11 months old.

    Thanks,
    Luke

  4. #4
    LukeJ Innov is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    31
    Sorry got it to work, Thanks!!

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

Similar Threads

  1. IIf statement to show all results
    By nigelbloomy in forum Queries
    Replies: 5
    Last Post: 07-22-2013, 02:00 PM
  2. Replies: 3
    Last Post: 01-15-2013, 01:58 PM
  3. Replies: 3
    Last Post: 07-18-2012, 10:08 PM
  4. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  5. Query Show Results on Form
    By john226 in forum Queries
    Replies: 3
    Last Post: 05-09-2011, 11:38 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