Results 1 to 3 of 3
  1. #1
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398

    No results from this query

    I have two tables:


    ITS_Operations_SVP
    ITS_VP_List

    The records within ITS_VP_List are also within ITS_Operations_SVP. I'm trying to write a query that displays the records within ITS_Operations_SVP that are not within ITS_VP_List.

    Here's what I have
    SELECT DISTINCT ITS_Operations_SVP.[VP Name]
    FROM ITS_Operations_SVP LEFT JOIN ITS_VP_List ON ITS_Operations_SVP.[VP Name] = ITS_VP_List.[VP Name]
    WHERE (((ITS_Operations_SVP.[VP Name])<>[ITS_VP_List]![VP Name]))
    ORDER BY ITS_Operations_SVP.[VP Name];

    This produces no records. What am I doing wrong?

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    There is a wizard to create this query. It is called the "Unmatched query".

    I used the wizard to create an unmatched query on two different tables:
    Code:
    SELECT [Account].[ACCOUNT], [Account].[ID], [Account].[Insp_Date], [Account].[StandAlone], [Account].[AccountBalance]
    FROM Account LEFT JOIN AccountNums ON [Account].[ID] = [AccountNums].[id]
    WHERE ([AccountNums].[id] Is Null);
    Try changingthe WHERE clause in your query to :
    Code:
    WHERE ITS_VP_List![VP Name] IS NULL

  3. #3
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    Thanks. I should have figured that one out.

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

Similar Threads

  1. Replies: 5
    Last Post: 05-21-2013, 02:21 PM
  2. Replies: 3
    Last Post: 05-02-2013, 10:36 AM
  3. Replies: 3
    Last Post: 01-15-2013, 01:58 PM
  4. Replies: 8
    Last Post: 10-22-2012, 07:43 PM
  5. Replies: 6
    Last Post: 05-14-2012, 07:24 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