The table below is a resulit of this query:
Code:
SELECT ProdReport.Date, ProdReport.Month, qryIndQuality.Operator, ProdReport.LID, qryIndQuality.LID
FROM ProdReport INNER JOIN qryIndQuality ON ProdReport.Operator = qryIndQuality.Operator
GROUP BY ProdReport.Date, ProdReport.Month, qryIndQuality.Operator, ProdReport.LID, qryIndQuality.LID;
Date |
Month |
Operator |
ProdReport.LID |
qryIndQuality.LID |
10/01/2013 |
10 |
John Smith |
55 |
1 |
10/01/2013 |
10 |
John Smith |
55 |
2 |
10/01/2013 |
10 |
John Smith |
55 |
5 |
10/02/2013 |
10 |
John Smith |
35 |
1 |
10/02/2013 |
10 |
John Smith |
35 |
2 |
10/02/2013 |
10 |
John Smith |
35 |
5 |
10/03/2013 |
10 |
John Smith |
2 |
1 |
10/03/2013 |
10 |
John Smith |
2 |
2 |
10/03/2013 |
10 |
John Smith |
2 |
5 |
10/04/2013 |
10 |
John Smith |
136 |
1 |
10/04/2013 |
10 |
John Smith |
136 |
2 |
10/04/2013 |
10 |
John Smith |
136 |
5 |
10/07/2013 |
10 |
John Smith |
184 |
1 |
10/07/2013 |
10 |
John Smith |
184 |
2 |
10/07/2013 |
10 |
John Smith |
184 |
5 |
10/08/2013 |
10 |
John Smith |
96 |
1 |
10/08/2013 |
10 |
John Smith |
96 |
2 |
10/08/2013 |
10 |
John Smith |
96 |
5 |
10/09/2013 |
10 |
John Smith |
108 |
1 |
10/09/2013 |
10 |
John Smith |
108 |
2 |
10/09/2013 |
10 |
John Smith |
108 |
5 |
It is close but it is .... presenting the data incorrectly.
Query1:
Code:
SELECT Format([Print_Time],"mm/dd/yyyy") AS [Date], Month([Print_Time]) AS [Month], Print_Actions.Print_User AS Operator, Count(Print_Actions.Note_ID) AS LID
FROM Print_Actions
GROUP BY Format([Print_Time],"mm/dd/yyyy"), Month([Print_Time]), Print_Actions.Print_User, Print_Actions.Print_Code
HAVING (((Format([Print_Time],"mm/dd/yyyy"))>=Format(Forms!Reporting!From,"mm/dd/yyyy") And (Format([Print_Time],"mm/dd/yyyy"))<=Format(Forms!Reporting!To,"mm/dd/yyyy")) And ((Print_Actions.Print_User)=Forms!Reporting!OpAut) And ((Print_Actions.Print_Code)=2));
Produces:
Date |
Month |
Operator |
LID |
10/01/2013 |
10 |
John SMith |
55 |
10/02/2013 |
10 |
John SMith |
35 |
10/03/2013 |
10 |
John SMith |
2 |
10/04/2013 |
10 |
John SMith |
136 |
10/07/2013 |
10 |
John SMith |
184 |
10/08/2013 |
10 |
John SMith |
96 |
10/09/2013 |
10 |
John SMith |
108 |
Query2:
Code:
SELECT tblMainDB.[Audit Date] AS [Date], Month([Audit Date]) AS [Month], tblMainDB.Operator, Count(tblMainDB.[Loan Identifier]) AS LID
FROM tblMainDB
GROUP BY tblMainDB.[Audit Date], Month([Audit Date]), tblMainDB.Operator
HAVING (((tblMainDB.[Audit Date])>=Format([Forms]![Reporting]![From],"mm/dd/yyyy") And (tblMainDB.[Audit Date])<=Format([Forms]![Reporting]![To],"mm/dd/yyyy")) AND ((tblMainDB.Operator)=[Forms]![Reporting]![OpAut]));
Produces:
Date |
Month |
Operator |
LID |
10/1/2013 |
10 |
John Smith |
1 |
10/4/2013 |
10 |
John Smith |
2 |
10/7/2013 |
10 |
John Smith |
5 |
10/9/2013 |
10 |
John Smith |
1 |