Results 1 to 3 of 3
  1. #1
    zburns is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    39

    Query Construct

    Thanks in advance - your help is greatly appreciated.

    I need my query to pull all certifications and employees that have received them, even those certifications that an employee does not have. Essentially showing in a report (grouped by emp) all certifications each emp has and those not yet received as evidenced by no Certification date.


    I have three tables: see attachment

    Not sure how to construct this to produce desired records
    SELECT [LastName] & ", " & [FirstName] & " " & [MiddleInitial] AS EmpName, tbl_Certifications.CertName, tbl_CertDetails.CertIssueDate
    FROM tbl_Employees INNER JOIN (tbl_Certifications INNER JOIN tbl_CertDetails ON tbl_Certifications.CertID = tbl_CertDetails.CertID) ON tbl_Employees.EmployeeID = tbl_CertDetails.EmpID;
    Attached Thumbnails Attached Thumbnails Query2.gif  

  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,770
    I presume tbl_CertDetails has records where employee has cert, no record if employee does not have a cert.

    What you need is a dataset of all possible pairings of employee and certs. This can be achieved with a query that includes tbl_Employees and tbl_Certifications. There will not be a JOIN clause and the result will be a Cartesian relation - all records from each table will join with all records of other table - giving all possible pairs.

    Now join that dataset with tbl_CertDetails by compound link on EmpID and CertID fields, join type "Include all records from {Cartesian dataset} ...".
    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
    zburns is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    39
    That's exactly what I needed. Worked perfect.
    Thank you very much

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

Similar Threads

  1. How to construct a BuildFilter
    By DBDave in forum Programming
    Replies: 5
    Last Post: 10-28-2014, 05:44 PM
  2. Replies: 6
    Last Post: 09-17-2014, 05:12 PM
  3. Replies: 1
    Last Post: 08-15-2014, 01:55 PM
  4. Replies: 7
    Last Post: 07-19-2014, 05:54 AM
  5. Replies: 5
    Last Post: 04-23-2013, 01:42 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