I have a program of works that are done as part of various regimes
ISF1 = Monthly
ISC1 = Monthly
ISF3 = Quarterly
ISC3 = Quarterly
ISF6 = Six Monthly
ISFA = Annually
I query another database against my programs
Which lets me know that a programmed file has been done within a particular period.
The next step I need to achieve is to compare the returned records "STARTDTTM" with the original database to see if they have been done in time.
ISF1 = Monthly plus or minus 1 working days (not including weekends)
ISC1 = Monthly Monthly plus or minus 1 working days(not including weekends)
ISF3 = Quarterly Monthly plus or minus 3 working days(not including weekends)
ISC3 = Quarterly Monthly plus or minus 3 working days(not including weekends)
ISF6 = Six Monthly Monthly plus or minus 3 working days(not including weekends)
ISFA = Annually plus or minus 5 working days(not including weekends)
Can anyone think of where I would get started on this one?
Thanks for you assistance in advance.
Lidias
ISF1 = Monthly
ISC1 = Monthly
ISF3 = Quarterly
ISC3 = Quarterly
ISF6 = Six Monthly
ISFA = Annually
I query another database against my programs
Code:
SELECT IMSV7_INLAI.STARTDTTM, IMSV7_INLAI.COMPKEY, WholeNetwork_Regime_3.COMPKEY, WholeNetwork_Regime_3.UNITID, IMSV7_INLAI.INSPKEY, IMSV7_INLAI.INSPNO, IMSV7_INLAI.ACTKEY, IMSV7_ACTDEFN_1.ACTDESC, IMSV7_ACTDEFN_1.ACTKEY, IMSV7_ACTDEFN_1.ACTCODE, WholeNetwork_Regime_3.FILENAME, WholeNetwork_Regime_3.REGIME, IMSV7_INLAI.COMPBY, WholeNetwork_Regime_3.INITIATION, WholeNetwork_Regime.INITIATION INTO mktbl_InspectPerformanceFigures_stp1_1
FROM (((tbl_InspectorChsn2 LEFT JOIN ((IMSV7_ACTDEFN AS IMSV7_ACTDEFN_1 RIGHT JOIN IMSV7_INLAI ON IMSV7_ACTDEFN_1.ACTKEY = IMSV7_INLAI.ACTKEY) LEFT JOIN WholeNetwork_Regime AS WholeNetwork_Regime_3 ON IMSV7_ACTDEFN_1.ACTCODE = WholeNetwork_Regime_3.INITIATION) ON tbl_InspectorChsn2.DBName = IMSV7_INLAI.COMPBY) LEFT JOIN WholeNetwork_Regime ON IMSV7_INLAI.COMPKEY = WholeNetwork_Regime.COMPKEY) LEFT JOIN tbl_RegimeChsn2 AS tbl_RegimeChsn2_1 ON WholeNetwork_Regime.REGIME = tbl_RegimeChsn2_1.REGIME) LEFT JOIN tbl_FilenameChsn2 AS tbl_FilenameChsn2_1 ON WholeNetwork_Regime.FILENAME = tbl_FilenameChsn2_1.FILENAME
WHERE (((tbl_FilenameChsn2_1.FILENAME) Is Not Null) AND ((tbl_RegimeChsn2_1.REGIME) Is Not Null))
GROUP BY IMSV7_INLAI.STARTDTTM, IMSV7_INLAI.COMPKEY, WholeNetwork_Regime_3.COMPKEY, WholeNetwork_Regime_3.UNITID, IMSV7_INLAI.INSPKEY, IMSV7_INLAI.INSPNO, IMSV7_INLAI.ACTKEY, IMSV7_ACTDEFN_1.ACTDESC, IMSV7_ACTDEFN_1.ACTKEY, IMSV7_ACTDEFN_1.ACTCODE, WholeNetwork_Regime_3.FILENAME, WholeNetwork_Regime_3.REGIME, IMSV7_INLAI.COMPBY, WholeNetwork_Regime_3.INITIATION, WholeNetwork_Regime.INITIATION, WholeNetwork_Regime.COMPKEY, WholeNetwork_Regime.FILENAME, WholeNetwork_Regime.REGIME
HAVING (((IMSV7_INLAI.STARTDTTM) Between [Forms]![frm_InspectionPerformanceFigures]![datefrom] & " 00:00:00" And [Forms]![frm_InspectionPerformanceFigures]![dateto] & " 23:59:59") AND ((IMSV7_INLAI.COMPBY) Is Not Null) AND ((WholeNetwork_Regime_3.INITIATION) Is Not Null) AND ((WholeNetwork_Regime.INITIATION)=[WholeNetwork_Regime_3]![Initiation]) AND ((WholeNetwork_Regime.COMPKEY)=[WholeNetwork_Regime_3]![COMPKEY]) AND ((WholeNetwork_Regime.FILENAME)=[WholeNetwork_Regime_3]![FILENAME]) AND ((WholeNetwork_Regime.REGIME)=[WholeNetwork_Regime_3]![REGIME]));
Which lets me know that a programmed file has been done within a particular period.
The next step I need to achieve is to compare the returned records "STARTDTTM" with the original database to see if they have been done in time.
ISF1 = Monthly plus or minus 1 working days (not including weekends)
ISC1 = Monthly Monthly plus or minus 1 working days(not including weekends)
ISF3 = Quarterly Monthly plus or minus 3 working days(not including weekends)
ISC3 = Quarterly Monthly plus or minus 3 working days(not including weekends)
ISF6 = Six Monthly Monthly plus or minus 3 working days(not including weekends)
ISFA = Annually plus or minus 5 working days(not including weekends)
Can anyone think of where I would get started on this one?
Thanks for you assistance in advance.
Lidias