Let's assume your main table is called
tblMain
it contains:
MainID (the PK of your instructors)
MainDate (the date of your instructor's certification)
Your sub table is:
tblSub
it contains:
SubID (PK of the table)
MainID (FK to your instructor table)
SubDate (date of the class taught)
this query would do what you want:
Code:
SELECT tblMain.MainID, tblMain.MainDesc, tblMain.MainDate, Sum(IIf([subdate]>[maindate],1,0)) AS ClassesTaught
FROM tblMain LEFT JOIN tblSub ON tblMain.MainID = tblSub.MainID
GROUP BY tblMain.MainID, tblMain.MainDesc, tblMain.MainDate
HAVING (((Sum(IIf([subdate]>[maindate],1,0)))<4));
Assuming you are only keeping their most recent certification date.
The query would be slightly different if you have multiple certification dates.