Results 1 to 6 of 6
  1. #1
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75

    Unmatched Query (Kind of)

    In my database I have three tables:



    tblUsers
    - UserID (AutoNumber)
    - FullName
    - HashID (User's Login ID)
    - Password
    - UserSecurity
    - EMTLevel
    - Station
    - COG
    - Status
    - Locked

    tblCertificationTypes
    - CertType_ID (Auto Number)
    -
    CertType

    tblCertifications
    - ID (Auto Number)
    - HashID (Lookup from tblUsers FK)
    - Certification (Lookup from tblCertifications FK)
    - CertNum
    - Issued
    - Expiration

    What I am trying to do is create a query that tells me who does not have certain certifications. The query would look at tblCertifications and output all the tblCertificationTypes that a user in tblUsers does not have.

    I have tried looking around online and messing with the query myself. All I end up getting is everyone with every certification type whether they are certified or not.

    I appreciate any help you all can offer me on this subject.

    Thanks,
    Z

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    Make a query Q1 using tblCerts & tblUsers, but DO NOT JOIN THEM.
    this makes a list of ALL users with ALL certs. (All possible)

    Now Q2, join tblUsers to tblCerts , (all that exist)

    then to get what's missing, Q3= Q1 and Q2 joined on user and Cert, but use OUTER JOIN.
    show ALL items in Q2, and what is missing in Q1.
    this shows what a user does not have.

  3. #3
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75
    Okay.....

    I have Q1 to show all possible certifications a person could have
    I have Q2 to show all certifications a person currently holds

    But I can not figure out Q3 to get it to show what someone doesn't have.

    Thanks
    Z

  4. #4
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75
    See attached pictures:

    1.) All Possible Matches

    Click image for larger version. 

Name:	allpossible.PNG 
Views:	4 
Size:	30.4 KB 
ID:	23138


    2.) All Existing Certifications

    Click image for larger version. 

Name:	allexist.PNG 
Views:	4 
Size:	35.6 KB 
ID:	23139


    Thanks Again!

  5. #5
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75
    Bump...

  6. #6
    lzook88 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    75
    Was able to solve the issue with this.. Will post the final fix when I have a moment later today!

    Thanks for your help as always AccesForums.Net!
    Z

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

Similar Threads

  1. Replies: 2
    Last Post: 10-02-2012, 03:18 PM
  2. Replies: 1
    Last Post: 12-08-2011, 01:52 PM
  3. Some kind of lookup query
    By borge in forum Queries
    Replies: 1
    Last Post: 10-16-2011, 03:13 PM
  4. Replies: 2
    Last Post: 08-17-2011, 03:02 AM
  5. What kind of query do I need?
    By cowboy in forum Queries
    Replies: 1
    Last Post: 02-17-2010, 04:09 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