Results 1 to 3 of 3
  1. #1
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77

    Cool Query to find records that don't have a related record with a certain value

    This may be in here and I just don't know how to word it.



    I have a table about document filing (document numbers, titles, owners, etc.). It is related to a table of events that have happened to the documents (moved, changed ownership, etc.). So when I join the tables, results can be like: 3 rows for document #1 because it has had 3 events; 6 rows for document #2 because it has had 6 events, etc. This database has about 300,000 events recorded. I need to find the documents that do not have any event types "5".

    Help is appreciated!

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    Microsoft Access 2007 and beyond has this built into a wizard for query. You want Find matches, or find records that dont match.

  3. #3
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77
    Thank you, Perceptus

    I want to exclude all the document records for the documents that have a "5" event, not just the row with the "5".

    If before the exclusion: 3 rows for document #1 because it has 3 events; 6 rows for document #2 because it has 6 events. Then after the exclusion, if document #2 has a "5" event, I don't want to see ANY of document #2's 6 rows on the list. Does that make sense?

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

Similar Threads

  1. Replies: 1
    Last Post: 04-11-2016, 03:50 PM
  2. Retun records that do not have a related record.
    By Homegrownandy in forum Queries
    Replies: 3
    Last Post: 11-18-2015, 09:13 AM
  3. Replies: 8
    Last Post: 09-15-2015, 11:34 AM
  4. Replies: 3
    Last Post: 03-22-2014, 04:32 PM
  5. Replies: 10
    Last Post: 10-10-2012, 11:15 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