Results 1 to 3 of 3
  1. #1
    natalia is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Location
    dwarfsville
    Posts
    6

    Search for specific dates

    I am currently creating a database for my alevel coursework,



    I wanted to know how I could search for a customer who ordered a turkey last year but who has not ordered this year.

    How could I set up this query?

    I have a field which is Date ordered, in the format dd/mm/yyyy.
    I was not sure how I could specifically search for the answer.

    Thanks for your time

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    SELECT a.customer FROM Orders AS a LEFT JOIN (select customer from orders WHERE stuff="Turkey" AND Year([orderdate])=2010) AS b ON a.customer = b.customer
    WHERE (((a.stuff)="Turkey") AND ((Year([a].[orderdate]))=2009) AND ((b.customer) Is Null));

  3. #3
    natalia is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Location
    dwarfsville
    Posts
    6
    Quote Originally Posted by weekend00 View Post
    SELECT a.customer FROM Orders AS a LEFT JOIN (select customer from orders WHERE stuff="Turkey" AND Year([orderdate])=2010) AS b ON a.customer = b.customer
    WHERE (((a.stuff)="Turkey") AND ((Year([a].[orderdate]))=2009) AND ((b.customer) Is Null));


    Thanks for your help!!

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

Similar Threads

  1. Replies: 2
    Last Post: 08-31-2010, 08:57 PM
  2. specific record
    By thewabit in forum Access
    Replies: 8
    Last Post: 02-17-2010, 11:32 PM
  3. Replies: 3
    Last Post: 01-14-2010, 08:32 AM
  4. Open to specific form
    By ecpike in forum Forms
    Replies: 2
    Last Post: 06-12-2009, 08:32 AM
  5. Customs Alert Messages on specific dates
    By edupi in forum Access
    Replies: 1
    Last Post: 05-08-2009, 04:51 AM

Tags for this Thread

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