Results 1 to 4 of 4
  1. #1
    chellelynn77 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    2

    Question Report that inludes non-occurence?

    Here is a simplified version of what I have:
    Employee Table (basic employee information)
    Course Table (information about several different classes)
    Occurrence Table (each row has employee, class, and date that training occurred)

    What I want:
    A report by employee that shows the most recent date they took a class (I figured out the query for that) AND indicates if they have not taken the class at all. That is the part I cannot figure out. I don't really care what the space contains (null, blank, etc.) but I want each class to show up under the employee's name whether they have taken the training or not. Is this possible? Do I need to change my setup somehow?



    THANKS!

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Welcome to the forum!

    You will need to create a query that yields a Cartesian Product between the employees and the classes. Something like this:

    SELECT tblEmployees.pkEmpID, tblEmployees.txtFName, tblCourses.pkCourseID, tblCourses.txtCourse
    FROM tblEmployees, tblCourses;

    Notice that there are no joins between the two tables, just the two tables

    You will now need to create another query. Bring in the query above as well as the query that you created that has the most recent date for each course taken by each employee. Make 2 left joins between the above query and your query. The joins will be between the employeeID and the courseID fields in the two queries.

    I have attached an sample database. To illustrate, I just used the occurrence table in place of the query you create, but the principle would be the same.

  3. #3
    chellelynn77 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    2

    Smile

    SOLVED! Thanks so much! Wish I would have found this forum hours/days/weeks/months ago

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome! Good luck with your project.

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

Similar Threads

  1. How to track/count the occurence of a particular field
    By jessica.ann.meade in forum Reports
    Replies: 4
    Last Post: 02-09-2011, 01:41 PM
  2. Replies: 4
    Last Post: 12-13-2010, 05:33 PM
  3. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  4. First and second occurence
    By jamphan in forum Queries
    Replies: 6
    Last Post: 08-23-2010, 09:54 AM
  5. Replies: 3
    Last Post: 05-21-2010, 03:57 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