daveyboy23
Board Regular
- Joined
- Jun 11, 2014
- Messages
- 59
Hi guys,
Hopefully someone can help.
Hopefully someone can help.
Function qry_CML_quality(ByVal wc As Date, ByVal table As String) As String
qry_CML_quality = _
"SELECT tblCaseDetails.RespondRef, tblCaseDetails.CHRespondID, " + table + ".Agree " _
+ "FROM (tblCaseDetails INNER JOIN " + table + " ON tblCaseDetails.RespondRef = " + table + ".RespondRef) " _
+ "WHERE (((" + table + ".CCDate) >= #" + CStr(convert_date(wc)) + "# And (" + table + ".CCDate) < #" + CStr(convert_date(wc + 7)) + "#));"
End Function
Function qry_CPI_Logged(ByVal wc As Date, ByVal table As String) As String
qry_CPI_Logged = _
strSQL = " SELECT tblCPILogged.Ref, tblCPILogged.[Logged By], tblCPILogged.[Logged Date] "
strSQL = strSQL & " FROM tblCPILogged INNER JOIN tblstafflist ON tblCPILogged.[Logged By] = TblStaffList.RESPONDID "
strSQL = strSQL & " WHERE tblCPILogged.[Logged Date] >= #6/23/2014# And tblCPILogged.[Logged Date] <= #6/27/2014#"
End Function
'DG complete
Set rs = db.OpenRecordset(qry_DG_productivity(wc), dbOpenDynaset)
Call print_recordset(rs, Sheet4, "BR5", "BR5:BT5005", 2)
'NCR Scan
'Set rs = db.OpenRecordset(qry_NCRScan_productivity(wc), dbOpenDynaset)
'Call print_recordset(rs, Sheet4, "BZ5", "BZ5:CB5005", 2)
'NCR CPI Logging
Set rs = db.OpenRecordset(qry_CPI_Logged_productivity(wc), dbOpenDynaset)
Call print_recordset(rs, Sheet4, "CT5", "CT5:CV5005", 2)
qry_NCR_CPI_Logged = _
" SELECT tblCPILogged.Ref, tblCPILogged.[Logged By], tblCPILogged.[Logged Date] "_
+ "FROM tblCPILogged INNER JOIN tblstafflist ON tblCPILogged.[Logged By] = TblStaffList.RESPONDID "_
+ "WHERE (((tblCPILogged.[Logged Date])>=#" + CStr(convert_date(wc)) + "# And (tblCPILogged.[Logged.Date])<#" + CStr(convert_date(wc + 7)) + "#));"
Set rs = db.OpenRecordset(qry_CPI_Logged, dbOpenDynaset)