Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49

    Listing fields

    Click image for larger version. 

Name:	Tables.JPG 
Views:	32 
Size:	28.9 KB 
ID:	7034


    Here is my question:

    Want I would like to do for this query is to show all GroupName with TrainMatrixName in it, then if this person (EMPID) has values from tblMatrix then I would like to see LegendLetter assigned to it.

    For Example:

    GroupName TrainMatrixName LegendLetter

    General Orientation X
    General ISO 14001 Training IP
    Office PowerPoint Training
    Office Word Training

    So the PowerPoint and Word this employee has no training down yet, but it's listed in tblTrainMatrix table. I know how to show if the employee has completed the training but do not know how to list like the example.



    Thank you in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    Have you tried to build query? What happens? What difficulty are you having? Do you want to provide project for analysis? Make copy, remove confidential data.
    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
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    Try to build the query and I list all training that would be available (coming from table tblTrainMatrix) when I join in from tblMatrix it will only show what that employee completed /started. I would like to list all possible training course that our company offers and show which course that employee has taken.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

  5. #5
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    That's what I am looking for. I will try that. thank you!

  6. #6
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    Okay, I have tried that and still not getting the results that I looking for. Here is what I have:

    SELECT qryTrainMatrixName.EmpID, qryTrainMatrixName.TrainMatrixName, qryTrainMatrixName.GroupName, qryTrainMatrixName.LegendLetter
    FROM qryTrainMatrixName
    LEFT JOIN tblTrainMatrix
    ON qryTrainMatrixName.TrainMatrixID = tblTrainMatrix.TrainMatrixID
    ORDER BY qryTrainMatrixName.EmpID;

    Output:


    Click image for larger version. 

Name:	output1.JPG 
Views:	17 
Size:	13.3 KB 
ID:	7136



    The is what I need to add:

    Click image for larger version. 

Name:	output2.JPG 
Views:	17 
Size:	21.4 KB 
ID:	7137

    There are four items missing from the TableMatrixName for the first output.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Please show the SQL for qryTrainMatrixName.

  8. #8
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    qryTrainMatrix Name - SQL as the following:

    SELECT tblMatrix.EmpID, tblTrainMatrix.TrainMatrixName, tblGroup.GroupName, tblLegend.LegendLetter, tblMatrix.TrainMatrixID
    FROM (tblGroup INNER JOIN tblTrainMatrix ON tblGroup.GroupID = tblTrainMatrix.GroupID)
    INNER JOIN (tblLegend INNER JOIN tblMatrix ON tblLegend.LegendID = tblMatrix.LegendID)
    ON tblTrainMatrix.TrainMatrixID = tblMatrix.TrainMatrixID;

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    OK, please tell us more about this
    There are four items missing from the TableMatrixName for the first output.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    Want to provide db for analysis? We could resolve this a lot easier and faster if we could analyze the full dataset. Follow instructions at bottom of my post.
    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.

  11. #11
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    I have the database here for you to review. If you like to see how it flows, open frmEmployee, search for employee 'Me Here' and then go Training Matrix, then Venest Training Tab. The listbox159 is where I would like to have this query listed.

    Again, thank you for your help in advance.
    Attached Files Attached Files

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    Issue appears to be with the jointypes of the query. Consider:

    SELECT tblMatrix.EmpID, tblTrainMatrix.TrainMatrixName, tblGroup.GroupName, tblLegend.LegendLetter, tblMatrix.TrainMatrixID
    FROM (tblGroup RIGHT JOIN tblTrainMatrix ON tblGroup.GroupID = tblTrainMatrix.GroupID) LEFT JOIN (tblLegend RIGHT JOIN tblMatrix ON tblLegend.LegendID = tblMatrix.LegendID) ON tblTrainMatrix.TrainMatrixID = tblMatrix.TrainMatrixID;
    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.

  13. #13
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    June7, I that works. Thank you for your help.

  14. #14
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    This query is going in the right direction. But if I only want to list employee that is equal to 1 and the courses that would be available to them to take. As soon as you add another employee to the mix it won't list the courses that would be available to them.

    Click image for larger version. 

Name:	Add Employee.JPG 
Views:	7 
Size:	28.4 KB 
ID:	7212

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    I manually input a record into tblMatrix. No problem seeing the new record in the list box. BTW, had to set properties of listbox.

    I just noticed you aren't using autonumber field for primary key fields, just number type. This means the ID will not self-generate and you must manually input the next number, unless you have code to handle this.
    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.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-23-2012, 06:16 AM
  2. ComboBox not listing multiple columns
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 09-26-2011, 11:24 AM
  3. ComboBox not listing values
    By tylerg11 in forum Access
    Replies: 1
    Last Post: 09-23-2011, 10:28 AM
  4. Query Not Listing All Items
    By Rawb in forum Queries
    Replies: 7
    Last Post: 05-14-2010, 08:00 AM
  5. One to Many Listing in Forms
    By zunebuggy in forum Forms
    Replies: 5
    Last Post: 05-11-2010, 08:12 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